Sidekiq::Testing.fake! is the default mode.

This commit is contained in:
Guo Xiang Tan 2017-08-24 09:29:40 +09:00
parent 91d3929f52
commit d0f5a3d7a4

View File

@ -193,8 +193,6 @@ describe Auth::GithubAuthenticator do
let(:user_with_custom_avatar) { Fabricate(:user, user_avatar: user_avatar) }
it 'does not enqueue a download_avatar_from_url job' do
Sidekiq::Testing.fake!
expect {
authenticator.after_authenticate(auth_token_for(user_with_custom_avatar))
}.to_not change(job_klass.jobs, :size)
@ -203,8 +201,6 @@ describe Auth::GithubAuthenticator do
context 'when user does not have a custom avatar' do
it 'enqueues a download_avatar_from_url job' do
Sidekiq::Testing.fake!
expect {
authenticator.after_authenticate(auth_token_for(user))
}.to change(job_klass.jobs, :size).by(1)