Treeat user as logged in after a password reset

Fixes #1160
This commit is contained in:
Tom Hughes 2016-02-26 16:30:32 +00:00
parent 480c17be58
commit f0fa701563
2 changed files with 3 additions and 2 deletions

View file

@ -702,7 +702,8 @@ class UserControllerTest < ActionController::TestCase
# Test setting a new password
post :reset_password, :token => token.token, :user => { :pass_crypt => "new_password", :pass_crypt_confirmation => "new_password" }
assert_response :redirect
assert_redirected_to :action => :login
assert_redirected_to root_path
assert_equal users(:inactive_user).id, session[:user]
user = User.find(users(:inactive_user).id)
assert_equal "active", user.status
assert_equal true, user.email_valid