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
3675b43c
Commit
3675b43c
authored
Nov 13, 2020
by
Philip Cunningham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 404 test coverage for DAST controllers
Adds 404 tests for site and scanner profile controllers.
parent
7e423209
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
ee/spec/requests/projects/security/dast_scanner_profiles_controller_spec.rb
...rojects/security/dast_scanner_profiles_controller_spec.rb
+10
-0
ee/spec/requests/projects/security/dast_site_profiles_controller_spec.rb
...s/projects/security/dast_site_profiles_controller_spec.rb
+15
-0
No files found.
ee/spec/requests/projects/security/dast_scanner_profiles_controller_spec.rb
View file @
3675b43c
...
...
@@ -84,5 +84,15 @@ RSpec.describe Projects::Security::DastScannerProfilesController, type: :request
get
edit_path
expect
(
assigns
(
:scanner_profile
)).
to
eq
(
dast_scanner_profile
)
end
context
'record does not exist'
do
let
(
:dast_scanner_profile
)
{
0
}
it
'sees a 404 error'
do
get
edit_path
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
end
end
ee/spec/requests/projects/security/dast_site_profiles_controller_spec.rb
View file @
3675b43c
...
...
@@ -77,5 +77,20 @@ RSpec.describe Projects::Security::DastSiteProfilesController, type: :request do
it_behaves_like
'a GET request'
do
let
(
:path
)
{
edit_path
}
end
context
'record does not exist'
do
let
(
:dast_site_profile
)
{
0
}
before
do
with_feature_available
with_user_authorized
end
it
'sees a 404 error'
do
get
edit_path
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
end
end
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