]> git.openstreetmap.org Git - rails.git/blobdiff - test/helpers/title_helper_test.rb
Page titles: put specific page title at the start not the end
[rails.git] / test / helpers / title_helper_test.rb
index cf7a1124398932f6d9c5e9be515e9fe76e6fa01d..97ccd7537216772d4697480e05e5d6bdb0ffb1f8 100644 (file)
@@ -7,7 +7,11 @@ class TitleHelperTest < ActionView::TestCase
     assert_nil @title
 
     set_title("Test Title")
-    assert_equal "OpenStreetMap | Test Title", response.header["X-Page-Title"]
+    assert_equal "Test Title | OpenStreetMap", response.header["X-Page-Title"]
     assert_equal "Test Title", @title
+
+    set_title("Test & Title")
+    assert_equal "Test & Title | OpenStreetMap", response.header["X-Page-Title"]
+    assert_equal "Test & Title", @title
   end
 end