Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'test_helper'
- class UserSessionsControllerTest < ActionController::TestCase
- context "on POST to /user_session/create with good creds" do
- setup do
- @user = Factory(:user, :password => "foobar")
- assert_nil UserSession.find # SANITY
- assert_nil @controller.send(:current_user) # SANITY
- # @user = Factory(:user, :password => "foobar")
- post :create, :user_session => { :email => @user.email, :password => "foobar" }
- end
- should_set_the_flash_to /welcome/i
- end
- end
Add Comment
Please, Sign In to add comment