diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-02-05 07:33:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-02-05 07:33:24 +0000 |
commit | 5d70fce6ce4c481f058fc1b89d567c1389cb7e54 (patch) | |
tree | fe7c5a9602d73ef312b544783efb0ff645bc7f1d /test/functional/account_controller_test.rb | |
parent | 40e6a74d4834f171bd8080dce39c587d84fb86da (diff) | |
download | redmine-5d70fce6ce4c481f058fc1b89d567c1389cb7e54.tar.gz redmine-5d70fce6ce4c481f058fc1b89d567c1389cb7e54.zip |
Security notifications when password or email adress is changed (#21421).
Patch by Jan Schulz-Hofen.
git-svn-id: http://svn.redmine.org/redmine/trunk@15145 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/account_controller_test.rb')
-rw-r--r-- | test/functional/account_controller_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index f308c935f..d623081a3 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -400,6 +400,7 @@ class AccountControllerTest < ActionController::TestCase end def test_post_lost_password_with_token_should_change_the_user_password + ActionMailer::Base.deliveries.clear user = User.find(2) token = Token.create!(:action => 'recovery', :user => user) @@ -408,6 +409,10 @@ class AccountControllerTest < ActionController::TestCase user.reload assert user.check_password?('newpass123') assert_nil Token.find_by_id(token.id), "Token was not deleted" + assert_not_nil (mail = ActionMailer::Base.deliveries.last) + assert_select_email do + assert_select 'a[href^=?]', 'http://localhost:3000/my/password', :text => 'Change password' + end end def test_post_lost_password_with_token_for_non_active_user_should_fail |