Guest User

Untitled

a guest
Apr 14th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. require 'test_helper'
  2.  
  3. class UserSessionsControllerTest < ActionController::TestCase
  4. context "on POST to /user_session/create with good creds" do
  5. setup do
  6. @user = Factory(:user, :password => "foobar")
  7. assert_nil UserSession.find # SANITY
  8. assert_nil @controller.send(:current_user) # SANITY
  9. # @user = Factory(:user, :password => "foobar")
  10. post :create, :user_session => { :email => @user.email, :password => "foobar" }
  11. end
  12. should_set_the_flash_to /welcome/i
  13. end
  14. end
Add Comment
Please, Sign In to add comment