fix(mailer): hardcoded application name

This commit is contained in:
Colin Darie 2024-07-01 10:25:49 +02:00
parent 0d744a0eb7
commit 327ebf106f
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
3 changed files with 3 additions and 3 deletions

View file

@ -94,7 +94,7 @@ class UserMailer < ApplicationMailer
def notify_after_closing(user, content, procedure = nil) def notify_after_closing(user, content, procedure = nil)
@user = user @user = user
@subject = "Clôture d'une démarche sur Démarches simplifiées" @subject = "Clôture d'une démarche sur #{Current.application_name}"
@procedure = procedure @procedure = procedure
@content = content @content = content

View file

@ -34,7 +34,7 @@ class UserMailerPreview < ActionMailer::Preview
end end
def notify_after_closing def notify_after_closing
UserMailer.notify_after_closing([user]) UserMailer.notify_after_closing(user, "Cette démarche est close")
end end
private private

View file

@ -156,7 +156,7 @@ RSpec.describe UserMailer, type: :mailer do
it 'notifies user about procedure closing with detailed message' do it 'notifies user about procedure closing with detailed message' do
expect(subject.to).to eq([user.email]) expect(subject.to).to eq([user.email])
expect(subject.body).to include("Clôture d&#39;une démarche sur Démarches simplifiées") expect(subject.body).to include("Clôture d&#39;une démarche sur demarches-simplifiees.fr")
expect(subject.body).to include("Bonjour,\r\n<br />saut de ligne") expect(subject.body).to include("Bonjour,\r\n<br />saut de ligne")
end end