Fix positive raise_error expectation without specifying the error type expected in Project::DestroyService specs
This commit is contained in:
parent
86f5a4aaf1
commit
9371cf3acf
1 changed files with 2 additions and 2 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue