Fix RSpec/MessageSpies
cop (#27751)
This commit is contained in:
parent
ae0d551d33
commit
49e2772064
19 changed files with 162 additions and 94 deletions
|
@ -21,12 +21,17 @@ RSpec.describe FollowRequest do
|
|||
end
|
||||
|
||||
it 'calls Account#follow!, MergeWorker.perform_async, and #destroy!' do
|
||||
expect(account).to receive(:follow!).with(target_account, reblogs: true, notify: false, uri: follow_request.uri, languages: nil, bypass_limit: true) do
|
||||
allow(account).to receive(:follow!) do
|
||||
account.active_relationships.create!(target_account: target_account)
|
||||
end
|
||||
expect(MergeWorker).to receive(:perform_async).with(target_account.id, account.id)
|
||||
expect(follow_request).to receive(:destroy!)
|
||||
allow(MergeWorker).to receive(:perform_async)
|
||||
allow(follow_request).to receive(:destroy!)
|
||||
|
||||
follow_request.authorize!
|
||||
|
||||
expect(account).to have_received(:follow!).with(target_account, reblogs: true, notify: false, uri: follow_request.uri, languages: nil, bypass_limit: true)
|
||||
expect(MergeWorker).to have_received(:perform_async).with(target_account.id, account.id)
|
||||
expect(follow_request).to have_received(:destroy!)
|
||||
end
|
||||
|
||||
it 'correctly passes show_reblogs when true' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue