DossierController: send receivedMail when the mail is ... received
This commit is contained in:
parent
9d710336b3
commit
3d7f04ad3d
2 changed files with 2 additions and 2 deletions
|
@ -93,7 +93,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
|||
dossier.received!
|
||||
flash.notice = 'Dossier considéré comme reçu.'
|
||||
|
||||
NotificationMailer.send_notification(dossier, dossier.procedure.initiated_mail).deliver_now!
|
||||
NotificationMailer.send_notification(dossier, dossier.procedure.received_mail).deliver_now!
|
||||
|
||||
redirect_to backoffice_dossier_path(id: dossier.id)
|
||||
end
|
||||
|
|
|
@ -237,7 +237,7 @@ describe Backoffice::DossiersController, type: :controller do
|
|||
|
||||
it 'Notification email is send' do
|
||||
expect(NotificationMailer).to receive(:send_notification)
|
||||
.with(dossier, kind_of(InitiatedMail)).and_return(NotificationMailer)
|
||||
.with(dossier, kind_of(ReceivedMail)).and_return(NotificationMailer)
|
||||
expect(NotificationMailer).to receive(:deliver_now!)
|
||||
|
||||
subject
|
||||
|
|
Loading…
Add table
Reference in a new issue