Change a deliver into a deliver_later
This commit is contained in:
parent
f06132edf1
commit
b88cea3c18
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
|
|||
def create
|
||||
user = User.find_by(email: params[:user][:email])
|
||||
if user.present?
|
||||
UserMailer.new_account_warning(user).deliver
|
||||
UserMailer.new_account_warning(user).deliver_later
|
||||
flash.notice = t('devise.registrations.signed_up_but_unconfirmed')
|
||||
redirect_to root_path
|
||||
else
|
||||
|
|
|
@ -37,7 +37,7 @@ describe Users::RegistrationsController, type: :controller do
|
|||
let!(:existing_user) { create(:user, email: email, password: password) }
|
||||
|
||||
before do
|
||||
allow(UserMailer).to receive(:new_account_warning).and_return(double(deliver: 'deliver'))
|
||||
allow(UserMailer).to receive(:new_account_warning).and_return(double(deliver_later: 'deliver'))
|
||||
subject
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue