mailers: add CTA to templated emails

This commit is contained in:
Pierre de La Morinerie 2019-07-22 13:21:05 +00:00
parent 6195ee41f3
commit 8313752663
6 changed files with 37 additions and 0 deletions

View file

@ -28,6 +28,11 @@ RSpec.describe NotificationMailer, type: :mailer do
expect(mail.body).to have_link('messagerie')
end
it 'renders the actions' do
expect(mail.body).to have_link('Consulter mon dossier', href: dossier_url(dossier))
expect(mail.body).to have_link('Jai une question', href: messagerie_dossier_url(dossier))
end
context 'when the template body contains tags' do
let(:email_template) { create(:received_mail, subject: 'Email subject', body: 'Hello --nom--, your dossier --lien dossier-- was processed.') }