Commit b1ea3da3 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 8f778ed5 09580cb6
......@@ -73,7 +73,7 @@ module DastOnDemandScans
return {} unless dast_site_profile
{
excluded_urls: dast_site_profile.excluded_urls.join(','),
excluded_urls: dast_site_profile.excluded_urls.presence&.join(','),
auth_username_field: dast_site_profile.auth_username_field,
auth_password_field: dast_site_profile.auth_password_field,
auth_username: dast_site_profile.auth_username
......
......@@ -70,6 +70,14 @@ RSpec.describe DastOnDemandScans::ParamsCreateService do
)
end
context 'when dast_site_profile.excluded_urls is empty' do
let_it_be(:dast_site_profile) { create(:dast_site_profile, project: project, excluded_urls: []) }
it 'returns nil' do
expect(subject.payload[:excluded_urls]).to be_nil
end
end
context 'when the target is not validated and an active scan is requested' do
let_it_be(:active_dast_scanner_profile) { create(:dast_scanner_profile, project: project, scan_type: 'active') }
......
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