summaryrefslogtreecommitdiff
path: root/spec/services/projects
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-08-14 20:39:31 +0000
committerRobert Speicher <robert@gitlab.com>2017-08-14 20:39:31 +0000
commit87bd9c56cc90ce03933d367ea0e9f392786489fd (patch)
tree19150415e857cd87c99a96d9a9198138eb62a198 /spec/services/projects
parentbd36637bdb45efebf2f1eb1119510a5708d83452 (diff)
parent9371cf3acf9aebe880b4ed5b78921a1bb6266be3 (diff)
downloadgitlab-ce-87bd9c56cc90ce03933d367ea0e9f392786489fd.tar.gz
Merge branch '36378-error-raising-expectation-in-spec-fix' into 'master'
Fix positive raise_error expectation without specifying the error type expected… Closes #36378 See merge request !13542
Diffstat (limited to 'spec/services/projects')
-rw-r--r--spec/services/projects/destroy_service_spec.rb4
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")