Guest User

Untitled

a guest
Sep 5th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. require "authlogic/test_case"
  2.  
  3. def execute_login
  4. activate_authlogic
  5. @user = Factory.create(:user, :confirmation_ok => true)
  6. @user_session = UserSession.create(@user)
  7. end
  8.  
  9. before(:all) do
  10. 09.
  11. activate_authlogic
  12. 10.
  13. @user = User.create!(:name => "foo bar", :email => "foo@bar.com", :password => "foobar", :password_confirmation => "foobar")
  14. 11.
  15. visit admin_posts_url
  16. 12.
  17. fill_in "user_session_email",:with => "foo@bar.com"
  18. 13.
  19. fill_in "user_session_password",:with => "foobar"
  20. 14.
  21. click_button "Enter"
  22. 15.
  23. end
Add Comment
Please, Sign In to add comment