Defect #44173 » 44173.patch
| app/controllers/account_controller.rb | ||
|---|---|---|
| 89 | 89 |
@user.must_change_passwd = false |
| 90 | 90 |
if @user.save |
| 91 | 91 |
@token.destroy |
| 92 |
Mailer.deliver_password_updated(@user, User.current) |
|
| 92 |
@user.remote_ip = request.remote_ip |
|
| 93 |
Mailer.deliver_password_updated(@user, @user) |
|
| 93 | 94 |
flash[:notice] = l(:notice_account_password_updated) |
| 94 | 95 |
redirect_to signin_path |
| 95 | 96 |
return |
| test/functional/account_controller_test.rb | ||
|---|---|---|
| 579 | 579 |
user.reload |
| 580 | 580 |
assert user.check_password?('newpass123')
|
| 581 | 581 |
assert_nil Token.find_by_id(token.id), "Token was not deleted" |
| 582 |
assert_not_nil ActionMailer::Base.deliveries.last |
|
| 582 |
assert_not_nil (mail = ActionMailer::Base.deliveries.last) |
|
| 583 |
assert_mail_body_match '0.0.0.0', mail |
|
| 583 | 584 |
assert_select_email do |
| 584 | 585 |
assert_select 'a[href^=?]', 'http://localhost:3000/my/password', :text => 'Change password' |
| 585 | 586 |
end |
- « Previous
- 1
- 2
- Next »