0
0
Fork 0

Consolidate configuration of Sidekiq::Testing.fake! setup (#28046)

This commit is contained in:
Matt Jankowski 2023-11-23 04:43:43 -05:00 committed by GitHub
parent c810b197ad
commit 973597c6f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 28 additions and 65 deletions

View file

@ -111,7 +111,7 @@ RSpec.describe UpdateStatusService, type: :service do
end
end
context 'when poll changes' do
context 'when poll changes', :sidekiq_fake do
let(:account) { Fabricate(:account) }
let!(:status) { Fabricate(:status, text: 'Foo', account: account, poll_attributes: { options: %w(Foo Bar), account: account, multiple: false, hide_totals: false, expires_at: 7.days.from_now }) }
let!(:poll) { status.poll }
@ -120,9 +120,7 @@ RSpec.describe UpdateStatusService, type: :service do
before do
status.update(poll: poll)
VoteService.new.call(voter, poll, [0])
Sidekiq::Testing.fake! do
subject.call(status, status.account_id, text: 'Foo', poll: { options: %w(Bar Baz Foo), expires_in: 5.days.to_i })
end
subject.call(status, status.account_id, text: 'Foo', poll: { options: %w(Bar Baz Foo), expires_in: 5.days.to_i })
end
it 'updates poll' do