Consolidate configuration of Sidekiq::Testing.fake!
setup (#28046)
This commit is contained in:
parent
c810b197ad
commit
973597c6f1
10 changed files with 28 additions and 65 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue