X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/21d60e359a6e972731e0385c51dd86536b7ea777..6d511fbd34f5e9b63d5dd1594e50856fe22c36bf:/test/integration/locale_test.rb diff --git a/test/integration/locale_test.rb b/test/integration/locale_test.rb index fbc2aff0e..c8c310e11 100644 --- a/test/integration/locale_test.rb +++ b/test/integration/locale_test.rb @@ -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