Test tags with &-encoded characters in trace emails

This commit is contained in:
Anton Khorev 2024-08-01 19:02:16 +03:00
parent 6f1ffc4a2b
commit 62af3d8745

View file

@ -10,12 +10,12 @@ class UserMailerTest < ActionMailer::TestCase
def test_gpx_description_tags
trace = create(:trace) do |t|
create(:tracetag, :trace => t, :tag => "one")
create(:tracetag, :trace => t, :tag => "two")
create(:tracetag, :trace => t, :tag => "three")
create(:tracetag, :trace => t, :tag => "two&three")
create(:tracetag, :trace => t, :tag => "four<five")
end
email = UserMailer.gpx_success(trace, 100)
assert_match("<em>one</em>, <em>two</em>, <em>three</em>", email.html_part.body.to_s)
assert_match("<em>one</em>, <em>two&amp;three</em>, <em>four&lt;five</em>", email.html_part.body.to_s)
end
def test_gpx_success_all_traces_link