@@ -142,6 +142,21 class AccountTest < Redmine::IntegrationTest | |||
|
142 | 142 | assert_redirected_to '/my/password' |
|
143 | 143 | end |
|
144 | 144 | |
|
145 | def test_flash_message_should_use_user_language_when_redirecting_user_for_password_change | |
|
146 | user = User.find_by_login('jsmith') | |
|
147 | user.must_change_passwd = true | |
|
148 | user.language = 'it' | |
|
149 | user.save! | |
|
150 | ||
|
151 | post '/login', :username => 'jsmith', :password => 'jsmith' | |
|
152 | assert_redirected_to '/my/page' | |
|
153 | follow_redirect! | |
|
154 | assert_redirected_to '/my/password' | |
|
155 | follow_redirect! | |
|
156 | ||
|
157 | assert_select 'div.error', :text => /richiesto che sia cambiata/ | |
|
158 | end | |
|
159 | ||
|
145 | 160 | def test_user_with_must_change_passwd_should_be_able_to_change_its_password |
|
146 | 161 | User.find_by_login('jsmith').update_attribute :must_change_passwd, true |
|
147 | 162 |
General Comments 0
You need to be logged in to leave comments.
Login now