diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-29 15:16:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-29 15:16:59 +0000 |
commit | 6f3ab71f3f4b62af5f241cb9e7a967903d68aeaf (patch) | |
tree | d8888c26d478473789173160018387718b5eef2f /test/integration/application_test.rb | |
parent | 6fe38abdc7f28a9cbd52a4f2117fc48070d42a36 (diff) | |
download | redmine-6f3ab71f3f4b62af5f241cb9e7a967903d68aeaf.tar.gz redmine-6f3ab71f3f4b62af5f241cb9e7a967903d68aeaf.zip |
Localisation not set correctly on authenticity token errors (#18499).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@13670 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/application_test.rb')
-rw-r--r-- | test/integration/application_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb index e70277a2e..e40dda8ea 100644 --- a/test/integration/application_test.rb +++ b/test/integration/application_test.rb @@ -76,4 +76,15 @@ class ApplicationTest < ActionDispatch::IntegrationTest ensure ActionController::Base.allow_forgery_protection = false end + + def test_localization_should_be_set_correctly_on_invalid_token + ActionController::Base.allow_forgery_protection = true + Setting.default_language = 'en' + post 'issues', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3' + assert_response 422 + assert_equal :fr, current_language + assert_select "html[lang=?]", "fr" + ensure + ActionController::Base.allow_forgery_protection = false + end end |