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
|
||||
flash.notice = "Administrateur créé"
|
||||
NewAdminMailer.new_admin_email(admin, current_administration).deliver_now!
|
||||
AdministrationMailer.new_admin_email(admin, current_administration).deliver_now!
|
||||
else
|
||||
flash.alert = admin.errors.full_messages
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class NewAdminMailer < ApplicationMailer
|
||||
class AdministrationMailer < ApplicationMailer
|
||||
def new_admin_email admin, administration
|
||||
@admin = admin
|
||||
@administration = administration
|
|
@ -35,8 +35,8 @@ describe AdministrationsController, type: :controller do
|
|||
end
|
||||
|
||||
it 'alert new mail are send' do
|
||||
expect(NewAdminMailer).to receive(:new_admin_email).and_return(NewAdminMailer)
|
||||
expect(NewAdminMailer).to receive(:deliver_now!)
|
||||
expect(AdministrationMailer).to receive(:new_admin_email).and_return(AdministrationMailer)
|
||||
expect(AdministrationMailer).to receive(:deliver_now!)
|
||||
subject
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue