summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-31 17:10:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-31 17:10:14 +0000
commita545fa41cbb57c229a55ac106a6e916e192009b3 (patch)
tree2acb1018a0bdf177233e718d3e73a03568edbfd9 /test
parent9d33ec22ccf09d6a82d6b8af841ab3f396029a5f (diff)
downloadredmine-a545fa41cbb57c229a55ac106a6e916e192009b3.tar.gz
redmine-a545fa41cbb57c229a55ac106a6e916e192009b3.zip
Merged r15775 and r15776 (#23346).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15777 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/integration/account_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/integration/account_test.rb b/test/integration/account_test.rb
index 0f12a1c83..5adbe8631 100644
--- a/test/integration/account_test.rb
+++ b/test/integration/account_test.rb
@@ -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