Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
fix: remove HTML tags from default tokens email
Browse files Browse the repository at this point in the history
  • Loading branch information
darccio committed Feb 23, 2023
1 parent 1887fdf commit 68952e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= t('consultations_mailer.default_tokens_email.body').strip %>
<% @tokens.each do |token| %>
- <%= t('consultations.consultation_token_created', token:, role: token.translated_role) %>
- <%= sanitize t('consultations.consultation_token_created', token:, role: token.translated_role), tags: [] %>
<% end %>
<%= t('application_mailer.complimentary_close', recipient: Rails.configuration.x.asembleo.title).strip %>
2 changes: 0 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ en:
default_tokens_email:
subject: Tokens created for %{consultation.title}
body: |
Hello,
The following tokens were created:
errors:
bad_request: Bad request
Expand Down
4 changes: 2 additions & 2 deletions test/mailers/consultations_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class ConsultationsMailerTest < ActionMailer::TestCase

assert_equal [to], email.to
assert_equal "Tokens created for #{consultation.title}", email.subject
assert_includes email.body.to_s, "- Admin token is <strong>#{tokens.first}</strong>."
assert_includes email.body.to_s, "- Manager token is <strong>#{tokens.second}</strong>."
assert_includes email.body.to_s, "- Admin token is #{tokens.first}."
assert_includes email.body.to_s, "- Manager token is #{tokens.second}."
assert_includes email.body.to_s, "Thanks,\n#{Rails.configuration.x.asembleo.title}"
end
end

0 comments on commit 68952e7

Please sign in to comment.