mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 23:36:01 +01:00
Leading slash required with Rails 4.2.
git-svn-id: http://svn.redmine.org/redmine/trunk@13783 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -32,21 +32,21 @@ class ApplicationTest < Redmine::IntegrationTest
|
||||
Setting.default_language = 'en'
|
||||
|
||||
# a french user
|
||||
get 'projects', { }, 'HTTP_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_select 'h2', :text => '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'
|
||||
get '/projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'it;q=0.8,en-us;q=0.5,en;q=0.3'
|
||||
assert_response :success
|
||||
assert_select 'h2', :text => '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'
|
||||
get '/projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'zz'
|
||||
assert_response :success
|
||||
assert_select 'h2', :text => 'Projects'
|
||||
assert_select "html[lang=?]", "en"
|
||||
@@ -54,11 +54,11 @@ class ApplicationTest < Redmine::IntegrationTest
|
||||
|
||||
def test_token_based_access_should_not_start_session
|
||||
# issue of a private project
|
||||
get 'issues/4.atom'
|
||||
get '/issues/4.atom'
|
||||
assert_response 302
|
||||
|
||||
rss_key = User.find(2).rss_key
|
||||
get "issues/4.atom?key=#{rss_key}"
|
||||
get "/issues/4.atom?key=#{rss_key}"
|
||||
assert_response 200
|
||||
assert_nil session[:user_id]
|
||||
end
|
||||
@@ -80,7 +80,7 @@ class ApplicationTest < Redmine::IntegrationTest
|
||||
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'
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user