Skip to content

Instantly share code, notes, and snippets.

@hogihung
Last active August 29, 2015 14:01
Show Gist options
  • Save hogihung/eafd23fc9abb90687be9 to your computer and use it in GitHub Desktop.
Save hogihung/eafd23fc9abb90687be9 to your computer and use it in GitHub Desktop.
User Registration and Login Feature
Feature: Registration
Scenario: User provides valid information
Given a unique email, password and matching password confirmation
When the user clicks the Sign up button
Then the output should be "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
Scenario: User supplies email, but no password
Given a unique email, but no password or password confirmation
When the user clicks the Sign up button
Then the output should be "Password can't be blank"
Scenario: User supplies email, password and non-matching passowrd confirmation
Given a unique email, a password and a different password confirmation
When the user clicks the Sign up button
Then the output should be "Password confirmation doesn't match Password"
Scenario: User provides email already in use, password and password confirmation
Given a previously used email, a password and matching password confirmation
When the user clicks the Sign up button
Then the output should be "Email has already been taken"
Feature: Login
Scenario: A non-confirmed user visits site and tries to log in
Given a valid email and password
When the users clicks the Sign in button
Then the output should be "You have to confirm your account before continuing."
Scenario: A confirmed user visits site
Given a valid email and password
When the user clicks the Sign in button
Then the output should be "Signed in successfully."
Scenario: A confirmed user visits, with incorrect password
Given a valid email but incorrect password
When the user clicks the Sign in button
Then the output should be "Invalid email or password."
Feature: Edit account to update name
Scenario: A signed in user want to add/edit their name
Given a user clicks their linked email/name
When the user enters a name in the name text box
And clicks on the Update button
Then the output should be "Account updated"
Feature: Edit account to update password
Scenario: A signed in user correctly changes their password
Given a user clicks their linked email/name
When the user enters a password and matching password confirmation
And clicks on the Update button
Then the output should be "Password updated"
Scenario: A signed in user incorrectly changes their password
Given a user clicks their linked email/name
When the user enters a password and non-matching password confirmation
And clicks on the Update button
Then the output should be "Passwords did not match, please try again."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment