mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 11:07:11 +02:00
Fixed: The error flash message on session expiration is not in the language of the user but of the user of the previous request (#17023).
git-svn-id: http://svn.redmine.org/redmine/trunk@13391 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -32,6 +32,7 @@ class SessionStartTest < ActionController::TestCase
|
||||
end
|
||||
|
||||
class SessionsTest < ActionController::TestCase
|
||||
include Redmine::I18n
|
||||
tests WelcomeController
|
||||
|
||||
fixtures :users
|
||||
@@ -108,6 +109,20 @@ class SessionsTest < ActionController::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_expired_user_session_should_set_locale
|
||||
set_language_if_valid 'it'
|
||||
user = User.find(2)
|
||||
user.language = 'fr'
|
||||
user.save!
|
||||
|
||||
with_settings :session_timeout => '60' do
|
||||
get :index, {}, {:user_id => user.id, :atime => 4.hours.ago.utc.to_i}
|
||||
assert_redirected_to '/login'
|
||||
assert_include "Veuillez vous reconnecter", flash[:error]
|
||||
assert_equal :fr, current_language
|
||||
end
|
||||
end
|
||||
|
||||
def test_anonymous_session_should_not_be_reset
|
||||
with_settings :session_lifetime => '720', :session_timeout => '60' do
|
||||
get :index
|
||||
|
||||
Reference in New Issue
Block a user