X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ccc898b8a04f14537c17c924deb477d156967089..97b7bac95669e838b2a507e21cb7d05416e52c0a:/test/helpers/browse_tags_helper_test.rb
diff --git a/test/helpers/browse_tags_helper_test.rb b/test/helpers/browse_tags_helper_test.rb
index ddd92d5a2..3f36b9210 100644
--- a/test/helpers/browse_tags_helper_test.rb
+++ b/test/helpers/browse_tags_helper_test.rb
@@ -46,6 +46,9 @@ class BrowseTagsHelperTest < ActionView::TestCase
html = format_value("colour", "#f00")
assert_dom_equal %(#f00), html
+
+ html = format_value("contact", "foo@example.com")
+ assert_dom_equal "foo@example.com", html
end
def test_wiki_link
@@ -240,29 +243,23 @@ class BrowseTagsHelperTest < ActionView::TestCase
assert_nil email
email = email_link("email", "x@example.com")
- assert_equal "x@example.com", email[:email]
- assert_equal "mailto:x@example.com", email[:url]
+ assert_equal "x@example.com", email
email = email_link("email", "other.email-with-hyphen@example.com")
- assert_equal "other.email-with-hyphen@example.com", email[:email]
- assert_equal "mailto:other.email-with-hyphen@example.com", email[:url]
+ assert_equal "other.email-with-hyphen@example.com", email
email = email_link("email", "user.name+tag+sorting@example.com")
- assert_equal "user.name+tag+sorting@example.com", email[:email]
- assert_equal "mailto:user.name+tag+sorting@example.com", email[:url]
+ assert_equal "user.name+tag+sorting@example.com", email
email = email_link("email", "dash-in@both-parts.com")
- assert_equal "dash-in@both-parts.com", email[:email]
- assert_equal "mailto:dash-in@both-parts.com", email[:url]
+ assert_equal "dash-in@both-parts.com", email
email = email_link("email", "example@s.example")
- assert_equal "example@s.example", email[:email]
- assert_equal "mailto:example@s.example", email[:url]
+ assert_equal "example@s.example", email
# Strips whitespace at ends
email = email_link("email", " test@email.com ")
- assert_equal "test@email.com", email[:email]
- assert_equal "mailto:test@email.com", email[:url]
+ assert_equal "test@email.com", email
end
def test_telephone_links