Rails 3.1 compatibility.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9006 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
888287c602
commit
62c8ad4df4
|
@ -33,19 +33,19 @@ class ApplicationTest < ActionController::IntegrationTest
|
||||||
Setting.default_language = 'en'
|
Setting.default_language = 'en'
|
||||||
|
|
||||||
# a french user
|
# a french user
|
||||||
get 'projects', { }, 'Accept-Language' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3'
|
get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_tag :tag => 'h2', :content => 'Projets'
|
assert_tag :tag => 'h2', :content => 'Projets'
|
||||||
assert_equal :fr, current_language
|
assert_equal :fr, current_language
|
||||||
|
|
||||||
# then an italien user
|
# then an italien user
|
||||||
get 'projects', { }, 'Accept-Language' => 'it;q=0.8,en-us;q=0.5,en;q=0.3'
|
get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'it;q=0.8,en-us;q=0.5,en;q=0.3'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_tag :tag => 'h2', :content => 'Progetti'
|
assert_tag :tag => 'h2', :content => 'Progetti'
|
||||||
assert_equal :it, current_language
|
assert_equal :it, current_language
|
||||||
|
|
||||||
# not a supported language: default language should be used
|
# not a supported language: default language should be used
|
||||||
get 'projects', { }, 'Accept-Language' => 'zz'
|
get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'zz'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_tag :tag => 'h2', :content => 'Projects'
|
assert_tag :tag => 'h2', :content => 'Projects'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue