Use Sidekiq fake!
instead of inline!
in specs (#25369)
This commit is contained in:
parent
ea1c0feb86
commit
00341c70ff
53 changed files with 66 additions and 76 deletions
|
@ -46,7 +46,7 @@ RSpec.describe Admin::AccountAction do
|
|||
expect(target_account).to be_suspended
|
||||
end
|
||||
|
||||
it 'queues Admin::SuspensionWorker by 1', :sidekiq_fake do
|
||||
it 'queues Admin::SuspensionWorker by 1' do
|
||||
expect do
|
||||
subject
|
||||
end.to change { Admin::SuspensionWorker.jobs.size }.by 1
|
||||
|
|
|
@ -58,7 +58,7 @@ RSpec.describe User do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'scopes' do
|
||||
describe 'scopes', :sidekiq_inline do
|
||||
describe 'recent' do
|
||||
it 'returns an array of recent users ordered by id' do
|
||||
first_user = Fabricate(:user)
|
||||
|
@ -452,7 +452,7 @@ RSpec.describe User do
|
|||
expect(user.confirmed_at).to be_present
|
||||
end
|
||||
|
||||
it 'delivers mails' do
|
||||
it 'delivers mails', :sidekiq_inline do
|
||||
expect(ActionMailer::Base.deliveries.count).to eq 2
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue