diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-29 10:42:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-29 10:42:58 +0000 |
commit | a170c3d93c955242908815bd7e5b013334befde4 (patch) | |
tree | 069bb00862718b4950a1519379f5dc9cb12ff0ad /test/functional | |
parent | 83921f27d4aff8b24c3a3e4685b92196d3439424 (diff) | |
download | redmine-a170c3d93c955242908815bd7e5b013334befde4.tar.gz redmine-a170c3d93c955242908815bd7e5b013334befde4.zip |
Merged r16287 to r16289 (#24416).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16299 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/account_controller_test.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 020dce97b..2adceb340 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -355,11 +355,22 @@ class AccountControllerTest < ActionController::TestCase end end - def test_get_lost_password_with_token_should_display_the_password_recovery_form + def test_get_lost_password_with_token_should_redirect_with_token_in_session user = User.find(2) token = Token.create!(:action => 'recovery', :user => user) get :lost_password, :token => token.value + assert_redirected_to '/account/lost_password' + + assert_equal token.value, request.session[:password_recovery_token] + end + + def test_get_lost_password_with_token_in_session_should_display_the_password_recovery_form + user = User.find(2) + token = Token.create!(:action => 'recovery', :user => user) + request.session[:password_recovery_token] = token.value + + get :lost_password assert_response :success assert_template 'password_recovery' |