Notification Mailer: use send_notification for all the mails
This commit is contained in:
parent
70b2020656
commit
6c560e65eb
4 changed files with 22 additions and 43 deletions
|
@ -21,18 +21,4 @@ RSpec.describe NotificationMailer, type: :mailer do
|
|||
it { expect(subject.body).to include("Pour le consulter, merci de vous rendre sur #{users_dossier_recapitulatif_url(dossier_id: dossier.id)}") }
|
||||
it { expect(subject.subject).to eq("Nouveau message pour votre dossier TPS N°#{dossier.id}") }
|
||||
end
|
||||
|
||||
describe ".dossier_submitted" do
|
||||
let(:user) { create(:user) }
|
||||
let(:dossier) { create(:dossier, user: user) }
|
||||
|
||||
subject(:subject) { described_class.dossier_submitted(dossier) }
|
||||
|
||||
before { dossier.reload }
|
||||
|
||||
it { expect(subject.body).to match("Nous vous confirmons que votre dossier N°#{dossier.id} a été déposé") }
|
||||
it { expect(subject.body).to match("auprès de #{dossier.procedure.organisation} avec succès") }
|
||||
it { expect(subject.body).to match("ce jour à #{dossier.updated_at}.") }
|
||||
it { expect(subject.subject).to eq("Votre dossier TPS N°#{dossier.id} a été déposé") }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue