##// END OF EJS Templates
Merged r15775 and r15776 (#23346)....
Jean-Philippe Lang -
r15395:a545fa41cbb5
parent child
Show More
@@ -51,7 +51,7 class ApplicationController < ActionController::Base
51 end
51 end
52 end
52 end
53
53
54 before_filter :session_expiration, :user_setup, :check_if_login_required, :check_password_change, :set_localization
54 before_filter :session_expiration, :user_setup, :check_if_login_required, :set_localization, :check_password_change
55
55
56 rescue_from ::Unauthorized, :with => :deny_access
56 rescue_from ::Unauthorized, :with => :deny_access
57 rescue_from ::ActionView::MissingTemplate, :with => :missing_template
57 rescue_from ::ActionView::MissingTemplate, :with => :missing_template
@@ -146,6 +146,21 class AccountTest < Redmine::IntegrationTest
146 assert_redirected_to '/my/password'
146 assert_redirected_to '/my/password'
147 end
147 end
148
148
149 def test_flash_message_should_use_user_language_when_redirecting_user_for_password_change
150 user = User.find_by_login('jsmith')
151 user.must_change_passwd = true
152 user.language = 'it'
153 user.save!
154
155 post '/login', :username => 'jsmith', :password => 'jsmith'
156 assert_redirected_to '/my/page'
157 follow_redirect!
158 assert_redirected_to '/my/password'
159 follow_redirect!
160
161 assert_select 'div.error', :text => /richiesto che sia cambiata/
162 end
163
149 def test_user_with_must_change_passwd_should_be_able_to_change_its_password
164 def test_user_with_must_change_passwd_should_be_able_to_change_its_password
150 User.find_by_login('jsmith').update_attribute :must_change_passwd, true
165 User.find_by_login('jsmith').update_attribute :must_change_passwd, true
151
166
General Comments 0
You need to be logged in to leave comments. Login now