Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Given("no Users and no BetaUsers") do
- User.delete_all
- BetaUser.delete_all
- end
- Given("a User with no login, email '$email', and password '$password'") do |email, password|
- Factory(:user, :email => email, :login => nil, :password => password, :password_confirmation => password)
- end
- Given("a BetaUser '$email'") do |email|
- @beta_user = Factory(:beta_user, :email => email)
- end
- # THIS one breaks my stories! is there something wrong with my post and delete here?
- Given("a BetaUser '$email' who is no bum") do |email|
- beta_user = Factory(:beta_user, :email => email)
- post_via_redirect '/users', :user => {:email => email, :password => 'password', :password_confirmation => 'password'}, :beta_code => beta_user.beta_code
- delete_via_redirect '/session'
- end
- Given("'$login_or_email' logged in with password '$password'") do |login_or_email, password|
- post '/session', { :login_or_email => login_or_email, :password => password }
- # require 'ruby-debug'
- # debugger
- # response.body is empty!!! WTF
- response.should be_redirect
- end
Add Comment
Please, Sign In to add comment