Guest User

Untitled

a guest
May 5th, 2018
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. Running 5 scenarios
  2.  
  3. Story: logging in
  4.  
  5.  
  6. As an account holder
  7. I want to log in
  8. So that I can take ownership of my submissions to the site
  9.  
  10.  
  11. Scenario: logging in successfully
  12.  
  13. Given a user with email "user@example.com" and passphrase "passphrase1000" (PENDING)
  14.  
  15. When I go to the login form (PENDING)
  16. And I fill in the "email" field with "user@example.com" (PENDING)
  17. And I fill in the "passphrase" field with "passphrase1000" (PENDING)
  18. And I click the "Log in" button (PENDING)
  19.  
  20. Then the page should show "Successfully logged in" (PENDING)
  21.  
  22. Scenario: logging in with a bad passphrase
  23.  
  24. Given a user with email "user@example.com" and passphrase "passphrase1000" (PENDING)
  25.  
  26. When I go to the login form (PENDING)
  27. And I fill in the "email" field with "user@example.com" (PENDING)
  28. And I fill in the "passphrase" field with "whoops!" (PENDING)
  29. And I click the "Log in" button (PENDING)
  30.  
  31. Then the page should show "Invalid email or passphrase" (PENDING)
  32.  
  33. Scenario: logging in with a bad email
  34.  
  35. Given a user with email "user@example.com" and passphrase "passphrase1000" (PENDING)
  36.  
  37. When I go to the login form (PENDING)
  38. And I fill in the "email" field with "bad@bad.com" (PENDING)
  39. And I fill in the "passphrase" field with "passphrase1000" (PENDING)
  40. And I click the "Log in" button (PENDING)
  41.  
  42. Then the page should show "Invalid email or passphrase" (PENDING)
  43.  
  44. Story: logging out
  45.  
  46.  
  47. As an account holder
  48. I want to log out
  49. So that nobody using my machine can impersonate me
  50.  
  51.  
  52. Scenario: logging out when logged-in
  53.  
  54. Given a logged-in user (PENDING)
  55.  
  56. When I logout (PENDING)
  57.  
  58. Then the page should show "You have logged out successfully" (PENDING)
  59.  
  60. Scenario: logging out when not logged-in
  61.  
  62. Given an anonymous user (PENDING)
  63.  
  64. /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/world.rb:63:in `store_and_call': You have a nil object when you didn't expect it! (NoMethodError)
  65. The error occurred while evaluating nil.name from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/world.rb:115:in `Then'
  66. from stories/sessions.rb:95
  67. from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/runner/scenario_runner.rb:20:in `instance_eval'
  68. from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/runner/scenario_runner.rb:20:in `run'
  69. from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/runner/story_runner.rb:49:in `run_stories'
  70. from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/runner/story_runner.rb:45:in `each'
  71. from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/runner/story_runner.rb:45:in `run_stories'
  72. from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/runner/story_runner.rb:40:in `each'
  73. from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/runner/story_runner.rb:40:in `run_stories'
  74. from /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rspec-rails/lib/spec/rails/../../../../rspec/lib/spec/story/runner.rb:49:in `register_exit_hook'
  75. from stories/sessions.rb:80
  76. When I logout (PENDING)
Add Comment
Please, Sign In to add comment