X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5b33f3f8e31c62bc3e5db1d5b120533c3afdde68..396f2e28dd27d514f7882c3918103b12764038de:/test/integration/page_locale_test.rb diff --git a/test/integration/page_locale_test.rb b/test/integration/page_locale_test.rb index c5e0d0ae3..ac34274a4 100644 --- a/test/integration/page_locale_test.rb +++ b/test/integration/page_locale_test.rb @@ -13,7 +13,8 @@ class PageLocaleTest < ActionDispatch::IntegrationTest def test_defaulting user = create(:user, :languages => []) - post_via_redirect "/login", :username => user.email, :password => "test" + post "/login", :username => user.email, :password => "test" + follow_redirect! get "/diary/new", {} assert_equal [], User.find(user.id).languages @@ -33,7 +34,8 @@ class PageLocaleTest < ActionDispatch::IntegrationTest get "/diary", :locale => "es" assert_select "html[lang=?]", "es" - post_via_redirect "/login", :username => user.email, :password => "test" + post "/login", :username => user.email, :password => "test" + follow_redirect! get "/diary" assert_select "html[lang=?]", "de"