summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-06-10 01:41:30 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-06-10 01:41:30 +0000
commitebb73fa258db4440060508d264f9c0557378be71 (patch)
treefd3cc2e9cb46659662412cd7719ae4f90d36c0aa /test/integration
parent5a7f656303f02d49f3d79cb0183e090a5e0c80af (diff)
downloadredmine-ebb73fa258db4440060508d264f9c0557378be71.tar.gz
redmine-ebb73fa258db4440060508d264f9c0557378be71.zip
set html lang by user locale (#14206)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11952 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/application_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb
index 409dcfd22..7f4e3b595 100644
--- a/test/integration/application_test.rb
+++ b/test/integration/application_test.rb
@@ -36,17 +36,20 @@ class ApplicationTest < ActionController::IntegrationTest
assert_response :success
assert_tag :tag => 'h2', :content => 'Projets'
assert_equal :fr, current_language
+ assert_select "html[lang=?]", "fr"
# then an italien user
get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'it;q=0.8,en-us;q=0.5,en;q=0.3'
assert_response :success
assert_tag :tag => 'h2', :content => 'Progetti'
assert_equal :it, current_language
+ assert_select "html[lang=?]", "it"
# not a supported language: default language should be used
get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'zz'
assert_response :success
assert_tag :tag => 'h2', :content => 'Projects'
+ assert_select "html[lang=?]", "en"
end
def test_token_based_access_should_not_start_session