Commit 87bd9c56 authored by Robert Speicher's avatar Robert Speicher

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
parents bd36637b 9371cf3a
Pipeline #10865771 (#) failed with stages
in 93 minutes and 6 seconds
......@@ -142,13 +142,13 @@ describe Projects::DestroyService do
context 'when `execute` raises unexpected error' do
before do
.to receive(:destroy!).and_raise("Other error message"))
.to receive(:destroy!).and_raise('Other error message'))
it 'allows error to bubble up and rolls back project deletion' do
expect do
Sidekiq::Testing.inline! { destroy_project(project, user, {}) } raise_error raise_error(Exception, 'Other error message')
expect(project.reload.pending_delete).to be(false)
expect(project.delete_error).to include("Other error message")
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