refactor(groupe instructeur mailer): rename mailer methods
This commit is contained in:
parent
cbf072961c
commit
5be58c8223
13 changed files with 38 additions and 38 deletions
|
@ -321,7 +321,7 @@ describe Administrateurs::GroupeInstructeursController, type: :controller do
|
|||
|
||||
context 'when there are many instructeurs' do
|
||||
before do
|
||||
allow(GroupeInstructeurMailer).to receive(:remove_instructeur)
|
||||
allow(GroupeInstructeurMailer).to receive(:notify_removed_instructeurs)
|
||||
.and_return(double(deliver_later: true))
|
||||
remove_instructeur(admin.instructeur)
|
||||
end
|
||||
|
@ -330,7 +330,7 @@ describe Administrateurs::GroupeInstructeursController, type: :controller do
|
|||
it { expect(gi_1_1.reload.instructeurs.count).to eq(1) }
|
||||
it { expect(response).to redirect_to(admin_procedure_groupe_instructeur_path(procedure, gi_1_1)) }
|
||||
it "calls GroupeInstructeurMailer with the right groupe and instructeur" do
|
||||
expect(GroupeInstructeurMailer).to have_received(:remove_instructeur).with(
|
||||
expect(GroupeInstructeurMailer).to have_received(:notify_removed_instructeurs).with(
|
||||
gi_1_1,
|
||||
[admin.instructeur],
|
||||
admin.email
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue