Add a test for i18n interpolation into plain and html parts
I spent some time working on an alternative translation strategy, without realising some of the plain text implications.
This commit is contained in:
parent
cc1d9592df
commit
dd8e5f04e3
1 changed files with 9 additions and 0 deletions
|
@ -17,4 +17,13 @@ class UserMailerTest < ActionMailer::TestCase
|
||||||
|
|
||||||
assert_match(/one two three/, email.html_part.body.to_s)
|
assert_match(/one two three/, email.html_part.body.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_html_encoding
|
||||||
|
user = create(:user, :display_name => "Jack & Jill <br>")
|
||||||
|
message = create(:message, :sender => user)
|
||||||
|
email = UserMailer.message_notification(message)
|
||||||
|
|
||||||
|
assert_match("Jack & Jill <br>", email.text_part.body.to_s)
|
||||||
|
assert_match("Jack & Jill <br>", email.html_part.body.to_s)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue