]> git.openstreetmap.org Git - rails.git/blob - test/helpers/title_helper_test.rb
Reset locale after tests which change it finish
[rails.git] / test / helpers / title_helper_test.rb
1 require "test_helper"
2
3 class TitleHelperTest < ActionView::TestCase
4   def test_set_title
5     set_title(nil)
6     assert_equal "OpenStreetMap", response.header["X-Page-Title"]
7     assert_nil @title
8
9     set_title("Test Title")
10     assert_equal "OpenStreetMap | Test Title", response.header["X-Page-Title"]
11     assert_equal "Test Title", @title
12
13     set_title("Test & Title")
14     assert_equal "OpenStreetMap | Test & Title", response.header["X-Page-Title"]
15     assert_equal "Test & Title", @title
16   end
17 end