Fix RSpec/StubbedMock cop (#25552)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Matt JankowskiandClaire authored and GitHub committed 2023-07-12 10:20:10 +02:00
1 parent 2e1391fdd2
commit 6c5a2233a8
9 files changed
+26 -31

No files matched your search

+2 -1
View File
@@ -88,10 +88,11 @@ describe Api::BaseController do
Mastodon::NotPermittedError => 403,
}.each do |error, code|
it "Handles error class of #{error}" do
expect(FakeService).to receive(:new).and_raise(error)
allow(FakeService).to receive(:new).and_raise(error)
get 'error'
expect(response).to have_http_status(code)
expect(FakeService).to have_received(:new)
end
end
end