def test_should_fail_login_and_not_redirect
post :login, :login => 'quentin', :password => 'bad password'
- assert_nil session[:user]
- assert_response :success
+ assert_nil session[:user]
+ assert_nil session[:user_id]
+ assert_response :success
end
def test_should_allow_signup
assert_difference User, :count do
- create_user
- assert_response :redirect
+ create_user
+ assert_response :redirect
end
end
def test_should_require_login_on_signup
assert_no_difference User, :count do
- create_user(:login => nil)
- assert assigns(:user).errors.on(:login)
- assert_response :success
+ create_user(:login => nil)
+ assert assigns(:user).errors.on(:login)
+ assert_response :success
end
end
login_as :quentin
get :logout
assert_nil session[:user]
+ assert_nil session[:user_id]
assert_response :redirect
end