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

@ -38,7 +38,7 @@ RSpec.describe FanOutOnWriteService, type: :service do
expect(home_feed_of(alice)).to include status.id
end
it 'is added to the home feed of a follower' do
it 'is added to the home feed of a follower', :sidekiq_inline do
expect(home_feed_of(bob)).to include status.id
expect(home_feed_of(tom)).to include status.id
end
@ -62,7 +62,7 @@ RSpec.describe FanOutOnWriteService, type: :service do
expect(home_feed_of(alice)).to include status.id
end
it 'is added to the home feed of the mentioned follower' do
it 'is added to the home feed of the mentioned follower', :sidekiq_inline do
expect(home_feed_of(bob)).to include status.id
end
@ -83,7 +83,7 @@ RSpec.describe FanOutOnWriteService, type: :service do
expect(home_feed_of(alice)).to include status.id
end
it 'is added to the home feed of a follower' do
it 'is added to the home feed of a follower', :sidekiq_inline do
expect(home_feed_of(bob)).to include status.id
expect(home_feed_of(tom)).to include status.id
end
@ -101,7 +101,7 @@ RSpec.describe FanOutOnWriteService, type: :service do
expect(home_feed_of(alice)).to include status.id
end
it 'is added to the home feed of the mentioned follower' do
it 'is added to the home feed of the mentioned follower', :sidekiq_inline do
expect(home_feed_of(bob)).to include status.id
end
@ -114,7 +114,7 @@ RSpec.describe FanOutOnWriteService, type: :service do
expect(redis).to_not have_received(:publish).with('timeline:public', anything)
end
context 'when handling status updates', :sidekiq_fake do
context 'when handling status updates' do
before do
subject.call(status)
@ -123,8 +123,6 @@ RSpec.describe FanOutOnWriteService, type: :service do
status.snapshot!(account_id: status.account_id)
redis.set("subscribed:timeline:#{eve.id}:notifications", '1')
Sidekiq::Worker.clear_all
end
it 'pushes the update to mentioned users through the notifications streaming channel' do