]> git.openstreetmap.org Git - rails.git/blobdiff - test/helpers/browse_tags_helper_test.rb
fix formatting of tag values with semicolon-separated URLs
[rails.git] / test / helpers / browse_tags_helper_test.rb
index 3f36b921092618a45e1ea2625c33d025d4dba46c..2329a7c961d8f23b28cc9d0ccf2fe80211ade425 100644 (file)
@@ -49,6 +49,12 @@ class BrowseTagsHelperTest < ActionView::TestCase
 
     html = format_value("contact", "foo@example.com")
     assert_dom_equal "<a title=\"Email foo@example.com\" href=\"mailto:foo@example.com\">foo@example.com</a>", html
+
+    html = format_value("source", "https://example.com")
+    assert_dom_equal "<a href=\"https://example.com\" rel=\"nofollow\">https://example.com</a>", html
+
+    html = format_value("source", "https://example.com;hello;https://example.net")
+    assert_dom_equal "<a href=\"https://example.com\" rel=\"nofollow\">https://example.com</a>;hello;<a href=\"https://example.net\" rel=\"nofollow\">https://example.net</a>", html
   end
 
   def test_wiki_link