Commit 3675b43c authored by Philip Cunningham's avatar Philip Cunningham

Add 404 test coverage for DAST controllers

Adds 404 tests for site and scanner profile controllers.
parent 7e423209
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment