mirror of
https://github.com/redmine/redmine.git
synced 2026-07-04 15:39:09 +02:00
Merged r15775 and r15776 (#23346).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15777 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -51,7 +51,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
end
|
||||
|
||||
before_filter :session_expiration, :user_setup, :check_if_login_required, :check_password_change, :set_localization
|
||||
before_filter :session_expiration, :user_setup, :check_if_login_required, :set_localization, :check_password_change
|
||||
|
||||
rescue_from ::Unauthorized, :with => :deny_access
|
||||
rescue_from ::ActionView::MissingTemplate, :with => :missing_template
|
||||
|
||||
@@ -146,6 +146,21 @@ class AccountTest < Redmine::IntegrationTest
|
||||
assert_redirected_to '/my/password'
|
||||
end
|
||||
|
||||
def test_flash_message_should_use_user_language_when_redirecting_user_for_password_change
|
||||
user = User.find_by_login('jsmith')
|
||||
user.must_change_passwd = true
|
||||
user.language = 'it'
|
||||
user.save!
|
||||
|
||||
post '/login', :username => 'jsmith', :password => 'jsmith'
|
||||
assert_redirected_to '/my/page'
|
||||
follow_redirect!
|
||||
assert_redirected_to '/my/password'
|
||||
follow_redirect!
|
||||
|
||||
assert_select 'div.error', :text => /richiesto che sia cambiata/
|
||||
end
|
||||
|
||||
def test_user_with_must_change_passwd_should_be_able_to_change_its_password
|
||||
User.find_by_login('jsmith').update_attribute :must_change_passwd, true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user