X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/22f84a3ea8bc39eb4cb91575d35dfca683336032..7f5300ee1b7788329d4bf369ea3f9a756f41647c:/test/functional/account_controller_test.rb?ds=sidebyside diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 3c8cd22..21e20ac 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -25,22 +25,23 @@ class AccountControllerTest < Test::Unit::TestCase 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 @@ -72,6 +73,7 @@ class AccountControllerTest < Test::Unit::TestCase login_as :quentin get :logout assert_nil session[:user] + assert_nil session[:user_id] assert_response :redirect end