diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-08-14 19:37:22 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-08-14 19:37:22 +0100 |
commit | 9371cf3acf9aebe880b4ed5b78921a1bb6266be3 (patch) | |
tree | 926665bad5743a26afb143d4f93af534e6876efe | |
parent | 86f5a4aaf19935b4d23a81426c1576bc16024696 (diff) | |
download | gitlab-ce-9371cf3acf9aebe880b4ed5b78921a1bb6266be3.tar.gz |
Fix positive raise_error expectation without specifying the error type expected in Project::DestroyService specs36378-error-raising-expectation-in-spec-fix
-rw-r--r-- | spec/services/projects/destroy_service_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/services/projects/destroy_service_spec.rb b/spec/services/projects/destroy_service_spec.rb index 85b05ef6d05..c867139d1de 100644 --- a/spec/services/projects/destroy_service_spec.rb +++ b/spec/services/projects/destroy_service_spec.rb @@ -142,13 +142,13 @@ describe Projects::DestroyService do context 'when `execute` raises unexpected error' do before do expect_any_instance_of(Project) - .to receive(:destroy!).and_raise(Exception.new("Other error message")) + .to receive(:destroy!).and_raise(Exception.new('Other error message')) end it 'allows error to bubble up and rolls back project deletion' do expect do Sidekiq::Testing.inline! { destroy_project(project, user, {}) } - end.to raise_error + end.to raise_error(Exception, 'Other error message') expect(project.reload.pending_delete).to be(false) expect(project.delete_error).to include("Other error message") |