Commit c7d10e11 authored by jplang's avatar jplang

Fix tests for r16287 (#24416).

git-svn-id: https://svn.redmine.org/redmine/trunk@16288 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent b6a7c862
......@@ -375,11 +375,22 @@ class AccountControllerTest < Redmine::ControllerTest
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_select 'input[type=hidden][name=token][value=?]', token.value
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment