0
0
Fork 0

Use Sidekiq fake! instead of inline! in specs (#25369)

This commit is contained in:
Matt Jankowski 2024-01-10 06:06:58 -05:00 committed by GitHub
parent ea1c0feb86
commit 00341c70ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 66 additions and 76 deletions

View file

@ -104,7 +104,7 @@ describe MoveWorker do
end
shared_examples 'lists handling' do
it 'puts the new account on the list and makes valid lists', sidekiq: :inline do
it 'puts the new account on the list and makes valid lists', :sidekiq_inline do
subject.perform(source_account.id, target_account.id)
expect(list.accounts.include?(target_account)).to be true
@ -159,7 +159,7 @@ describe MoveWorker do
describe '#perform' do
context 'when both accounts are distant' do
it 'calls UnfollowFollowWorker', :sidekiq_fake do
it 'calls UnfollowFollowWorker' do
subject.perform(source_account.id, target_account.id)
expect(UnfollowFollowWorker).to have_enqueued_sidekiq_job(local_follower.id, source_account.id, target_account.id, false)
end
@ -170,7 +170,7 @@ describe MoveWorker do
context 'when target account is local' do
let(:target_account) { Fabricate(:account) }
it 'calls UnfollowFollowWorker', :sidekiq_fake do
it 'calls UnfollowFollowWorker' do
subject.perform(source_account.id, target_account.id)
expect(UnfollowFollowWorker).to have_enqueued_sidekiq_job(local_follower.id, source_account.id, target_account.id, true)
end