X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/01b72f7adf2b46741f30b7c15ec72fc4e96338d7..a8020dc47555d4520b9218916693ca691ae7dbe1:/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 23136951c..537bb9d0d 100644
--- a/test/mailers/user_mailer_test.rb
+++ b/test/mailers/user_mailer_test.rb
@@ -6,4 +6,24 @@ class UserMailerTest < ActionMailer::TestCase
assert_match(/ t, :tag => "one")
+ create(:tracetag, :trace => t, :tag => "two")
+ create(:tracetag, :trace => t, :tag => "three")
+ end
+ email = UserMailer.gpx_success(trace, 100)
+
+ 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