Guest User

Untitled

a guest
Feb 28th, 2018
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. Given /^a registered user with the email "(.*)" with password "(.*)" exists$/ do |email, password|
  2. @user = Factory(:registered_user, :email => email, :password => password, :password_confirmation => password)
  3. end
  4.  
  5. Given /^a confirmed user with the email "(.*)" with password "(.*)" exists$/ do |email, password|
  6. @user = Factory(:email_confirmed_user, :email => email, :password => password, :password_confirmation => password)
  7. end
  8.  
  9. Given /^no current user$/ do
  10. logout_user
  11. end
  12.  
  13. Then /^the login form should be shown$/ do
  14. assert_template "sessions/new"
  15. end
  16.  
  17. Then /^I should\s?((?:not)?) be authorized$/ do |present|
  18. assert_response present ? :unauthorized : :success
  19. end
  20.  
  21. Then /^I should\s?((?:not)?) be signed in$/ do |present|
  22. assert_equal controller.signed_in?, present.blank?
  23. end
Add Comment
Please, Sign In to add comment