Merge pull request #10567 from colinux/fix-hardcoded-name

Tech: corrige le nom de l'application hardcodé dans un email
This commit is contained in:
Colin Darie 2024-07-02 12:36:19 +00:00 committed by GitHub
commit b2514dd16c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)
@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
@content = content

View file

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

View file

@ -156,7 +156,7 @@ RSpec.describe UserMailer, type: :mailer do
it 'notifies user about procedure closing with detailed message' do
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")
end