Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ def gpo_reminder
end

def suspension_confirmed
@help_text = t('user_mailer.suspension_confirmed.contact_agency')

with_user_locale(user) do
@help_text = t('user_mailer.suspension_confirmed.contact_agency')

mail(to: email_address.email, subject: t('user_mailer.suspension_confirmed.subject'))
end
end
Expand Down
11 changes: 11 additions & 0 deletions spec/mailers/user_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,17 @@ def expect_email_body_to_have_help_and_contact_links
it 'does not link to the help center' do
expect(mail.html_part.body).to_not include(MarketingSite.nice_help_url)
end

context 'in another language' do
let(:user) { build(:user, email_language: :es) }

it 'translates the footer help text correctly' do
expect(mail.html_part.body).
to include(t('user_mailer.suspension_confirmed.contact_agency', locale: :es))
expect(mail.html_part.body).
to_not include(t('user_mailer.suspension_confirmed.contact_agency', locale: :en))
end
end
end

describe '#account_reinstated' do
Expand Down