mailers: add a NO_REPLY address to transactional emails
This commit is contained in:
parent
aa1cf6788b
commit
dd6c6bfe7a
6 changed files with 17 additions and 3 deletions
|
@ -4,6 +4,10 @@ RSpec.describe DossierMailer, type: :mailer do
|
|||
let(:to_email) { 'instructeur@exemple.gouv.fr' }
|
||||
|
||||
shared_examples 'a dossier notification' do
|
||||
it 'is sent from a no-reply address' do
|
||||
expect(subject.from.first).to eq(Mail::Address.new(NO_REPLY_EMAIL).address)
|
||||
end
|
||||
|
||||
it 'includes the contact informations in the footer' do
|
||||
expect(subject.body).to include('ne pas répondre')
|
||||
end
|
||||
|
|
|
@ -56,5 +56,9 @@ RSpec.describe NotificationMailer, type: :mailer do
|
|||
expect(mail.body).not_to include('iframe')
|
||||
end
|
||||
end
|
||||
|
||||
it 'sends the mail from a no-reply address' do
|
||||
expect(subject.from.first).to eq(Mail::Address.new(NO_REPLY_EMAIL).address)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue