diff options
Diffstat (limited to 'spec/services/security/ci_configuration/sast_create_service_spec.rb')
-rw-r--r-- | spec/services/security/ci_configuration/sast_create_service_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/services/security/ci_configuration/sast_create_service_spec.rb b/spec/services/security/ci_configuration/sast_create_service_spec.rb index e80fe1a42fa..555902fd77c 100644 --- a/spec/services/security/ci_configuration/sast_create_service_spec.rb +++ b/spec/services/security/ci_configuration/sast_create_service_spec.rb @@ -45,8 +45,13 @@ RSpec.describe Security::CiConfiguration::SastCreateService, :snowplow, let(:params) { { initialize_with_sast: false } } - it 'raises an error' do - expect { result }.to raise_error(Gitlab::Graphql::Errors::MutationError) + it 'returns a ServiceResponse error' do + expect(result).to be_kind_of(ServiceResponse) + expect(result.status).to eq(:error) + expect(result.message).to eq('You must <a target="_blank" rel="noopener noreferrer" ' \ + 'href="http://localhost/help/user/project/repository/index.md#' \ + 'add-files-to-a-repository">add at least one file to the ' \ + 'repository</a> before using Security features.') end end |