Treeat user as logged in after a password reset
[rails.git] / test / controllers / user_controller_test.rb
index 37b8a7f30efaf39987a87b2e4b5957e59ae6fa67..6a2769f17b2bbb329e08bf31170456fd8892fbd2 100644 (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