]> git.openstreetmap.org Git - rails.git/blobdiff - test/integration/locale_test.rb
Directions, read "to" location in URL - fixes #998
[rails.git] / test / integration / locale_test.rb
index fbc2aff0e8ea208923386fb4931a2323ec605776..c8c310e113ba8262f4f55963b5437963f469200b 100644 (file)
@@ -3,6 +3,14 @@ require "test_helper"
 class LocaleTest < ActionDispatch::IntegrationTest
   fixtures :users
 
+  def setup
+    I18n.locale = "en"
+  end
+
+  def teardown
+    I18n.locale = "en"
+  end
+
   def test_defaulting
     user = users(:second_public_user)
 
@@ -12,7 +20,7 @@ class LocaleTest < ActionDispatch::IntegrationTest
     assert_equal [], User.find(user.id).languages
     assert_select "html[lang=?]", "en"
 
-    get "/diary/new", {},  { "HTTP_ACCEPT_LANGUAGE" => "fr, en" }
+    get "/diary/new", {}, { "HTTP_ACCEPT_LANGUAGE" => "fr, en" }
     assert_equal %w(fr en), User.find(user.id).languages
     assert_select "html[lang=?]", "fr"
   end