X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b83c0acbd11e155f9565309a2c4510f8eb35392a..f28bad7229823d224c1b17342aef9bac64a65f45:/test/mailers/user_mailer_test.rb?ds=sidebyside
diff --git a/test/mailers/user_mailer_test.rb b/test/mailers/user_mailer_test.rb
index 2a4b5a417..537bb9d0d 100644
--- a/test/mailers/user_mailer_test.rb
+++ b/test/mailers/user_mailer_test.rb
@@ -17,4 +17,13 @@ class UserMailerTest < ActionMailer::TestCase
assert_match(/one two three/, email.html_part.body.to_s)
end
+
+ def test_html_encoding
+ user = create(:user, :display_name => "Jack & Jill
")
+ message = create(:message, :sender => user)
+ email = UserMailer.message_notification(message)
+
+ assert_match("Jack & Jill
", email.text_part.body.to_s)
+ assert_match("Jack & Jill <br>", email.html_part.body.to_s)
+ end
end