Rename new_admin_mailer to administration_mailer
This commit is contained in:
parent
c4d0028d6d
commit
d7d5d7eff4
4 changed files with 4 additions and 4 deletions
|
@ -18,7 +18,7 @@ class AdministrationsController < ApplicationController
|
||||||
|
|
||||||
if admin.save
|
if admin.save
|
||||||
flash.notice = "Administrateur créé"
|
flash.notice = "Administrateur créé"
|
||||||
NewAdminMailer.new_admin_email(admin, current_administration).deliver_now!
|
AdministrationMailer.new_admin_email(admin, current_administration).deliver_now!
|
||||||
else
|
else
|
||||||
flash.alert = admin.errors.full_messages
|
flash.alert = admin.errors.full_messages
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class NewAdminMailer < ApplicationMailer
|
class AdministrationMailer < ApplicationMailer
|
||||||
def new_admin_email admin, administration
|
def new_admin_email admin, administration
|
||||||
@admin = admin
|
@admin = admin
|
||||||
@administration = administration
|
@administration = administration
|
|
@ -35,8 +35,8 @@ describe AdministrationsController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'alert new mail are send' do
|
it 'alert new mail are send' do
|
||||||
expect(NewAdminMailer).to receive(:new_admin_email).and_return(NewAdminMailer)
|
expect(AdministrationMailer).to receive(:new_admin_email).and_return(AdministrationMailer)
|
||||||
expect(NewAdminMailer).to receive(:deliver_now!)
|
expect(AdministrationMailer).to receive(:deliver_now!)
|
||||||
subject
|
subject
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue