Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fa483f7a
Commit
fa483f7a
authored
Sep 13, 2021
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hardcode string literals
parent
5b5dedc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
ee/spec/helpers/projects/on_demand_scans_helper_spec.rb
ee/spec/helpers/projects/on_demand_scans_helper_spec.rb
+4
-6
ee/spec/helpers/projects/security/dast_profiles_helper_spec.rb
...ec/helpers/projects/security/dast_profiles_helper_spec.rb
+2
-3
No files found.
ee/spec/helpers/projects/on_demand_scans_helper_spec.rb
View file @
fa483f7a
...
...
@@ -5,13 +5,11 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
OnDemandScansHelper
do
describe
'#on_demand_scans_data'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:default_branch
)
{
'default-branch'
}
let_it_be
(
:path_with_namespace
)
{
'foo/bar'
}
let_it_be
(
:timezones
)
{
[{
identifier:
"Europe/Paris"
}]
}
before
do
allow
(
project
).
to
receive
(
:default_branch
).
and_return
(
default_branch
)
allow
(
project
).
to
receive
(
:path_with_namespace
).
and_return
(
path_with_namespace
)
allow
(
project
).
to
receive
(
:default_branch
).
and_return
(
"default-branch"
)
allow
(
project
).
to
receive
(
:path_with_namespace
).
and_return
(
"foo/bar"
)
allow
(
helper
).
to
receive
(
:timezone_data
).
with
(
format: :full
).
and_return
(
timezones
)
end
...
...
@@ -19,8 +17,8 @@ RSpec.describe Projects::OnDemandScansHelper do
expect
(
helper
.
on_demand_scans_data
(
project
)).
to
match
(
'help-page-path'
=>
"/help/user/application_security/dast/index#on-demand-scans"
,
'empty-state-svg-path'
=>
match_asset_path
(
'/assets/illustrations/empty-state/ondemand-scan-empty.svg'
),
'default-branch'
=>
default_branch
,
'project-path'
=>
path_with_namespace
,
'default-branch'
=>
"default-branch"
,
'project-path'
=>
"foo/bar"
,
'profiles-library-path'
=>
"/
#{
project
.
full_path
}
/-/security/configuration/dast_scans"
,
'scanner-profiles-library-path'
=>
"/
#{
project
.
full_path
}
/-/security/configuration/dast_scans#scanner-profiles"
,
'site-profiles-library-path'
=>
"/
#{
project
.
full_path
}
/-/security/configuration/dast_scans#site-profiles"
,
...
...
ee/spec/helpers/projects/security/dast_profiles_helper_spec.rb
View file @
fa483f7a
...
...
@@ -5,11 +5,10 @@ require 'spec_helper'
RSpec
.
describe
Projects
::
Security
::
DastProfilesHelper
do
describe
'#dast_profiles_list_data'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:path_with_namespace
)
{
'foo/bar'
}
let_it_be
(
:timezones
)
{
[{
identifier:
"Europe/Paris"
}]
}
before
do
allow
(
project
).
to
receive
(
:path_with_namespace
).
and_return
(
path_with_namespace
)
allow
(
project
).
to
receive
(
:path_with_namespace
).
and_return
(
"foo/bar"
)
allow
(
helper
).
to
receive
(
:timezone_data
).
with
(
format: :full
).
and_return
(
timezones
)
end
...
...
@@ -19,7 +18,7 @@ RSpec.describe Projects::Security::DastProfilesHelper do
'new_dast_saved_scan_path'
=>
"/
#{
project
.
full_path
}
/-/on_demand_scans/new"
,
'new_dast_site_profile_path'
=>
"/
#{
project
.
full_path
}
/-/security/configuration/dast_scans/dast_site_profiles/new"
,
'new_dast_scanner_profile_path'
=>
"/
#{
project
.
full_path
}
/-/security/configuration/dast_scans/dast_scanner_profiles/new"
,
'project_full_path'
=>
path_with_namespace
,
'project_full_path'
=>
"foo/bar"
,
'timezones'
=>
timezones
.
to_json
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment