0
0
Fork 0

Fix RSpec/VerifiedDoubles cop (#25469)

This commit is contained in:
Matt Jankowski 2023-06-22 08:55:22 -04:00 committed by GitHub
parent 38433ccd0b
commit 05f9e39b32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 162 additions and 172 deletions

View file

@ -23,7 +23,8 @@ RSpec.describe Api::V1::ReportsController do
let(:rule_ids) { nil }
before do
allow(AdminMailer).to receive(:new_report).and_return(double('email', deliver_later: nil))
allow(AdminMailer).to receive(:new_report)
.and_return(instance_double(ActionMailer::MessageDelivery, deliver_later: nil))
post :create, params: { status_ids: [status.id], account_id: target_account.id, comment: 'reasons', category: category, rule_ids: rule_ids, forward: forward }
end

View file

@ -26,7 +26,7 @@ describe Api::Web::EmbedsController do
context 'when fails to find status' do
let(:url) { 'https://host.test/oembed.html' }
let(:service_instance) { double('fetch_oembed_service') }
let(:service_instance) { instance_double(FetchOEmbedService) }
before do
allow(FetchOEmbedService).to receive(:new) { service_instance }