FEATURE: move more urgent emails notifications to critical queue

Move signup, admin login and password change email notifications
to critical queue
This commit is contained in:
Sam
2016-04-07 14:38:43 +10:00
parent 2ecff60af2
commit a130cb8305
13 changed files with 25 additions and 26 deletions

View File

@ -210,7 +210,7 @@ describe SessionController do
end
it 'sends an activation email' do
Jobs.expects(:enqueue).with(:user_email, has_entries(type: :signup))
Jobs.expects(:enqueue).with(:critical_user_email, has_entries(type: :signup))
sso = get_sso('/a/')
sso.external_id = '666' # the number of the beast
sso.email = 'bob@bob.com'
@ -632,7 +632,7 @@ describe SessionController do
end
it "enqueues an email" do
Jobs.expects(:enqueue).with(:forgot_password, has_entries(user_id: user.id))
Jobs.expects(:enqueue).with(:critical_user_email, has_entries(type: :forgot_password, user_id: user.id))
xhr :post, :forgot_password, login: user.username
end
end