Skip to content

Instantly share code, notes, and snippets.

@ngty
Created December 20, 2008 16:22
Show Gist options
  • Save ngty/38355 to your computer and use it in GitHub Desktop.
Save ngty/38355 to your computer and use it in GitHub Desktop.
Create/Edit User Feature
Feature: Create Users
In order for system to support management of users
I should be able to create user in the system
Scenario: Successfully Created User
Given I go to /users
And I follow "New User"
Then I should see "Create User" page
Given I focus on section "Basic Info"
And I fill in "Name*" with "Carol"
And I fill in "Email*" with "carol@fmail.com"
And I fill in "Password*" with "efg"
And I fill in "Confirm Password*" with "efg"
And I choose "Status" with "archived"
When I press "Save"
Then I should see "Manage Users" page with notice "User was successfully created"
And I should observe Carol created
Feature: Edit User
In order for system to support management of users
I should be able to edit existing user in the system
Scenario: Successfully Edited User
Given the following users exist in the system:
| name | email | status | password | password_confirmation |
| Cathy | cathy@fmail.com | active | abc | abc |
| Joe | joe@fmail.com | archived | xyz | xyz |
When I go to /users
And I follow "Edit" for Cathy
Then I should see "Edit User" page
Given I focus on section "Basic Info"
And I fill in "Name*" as "Carol"
And I fill in "Email*" as "carol@fmail.com"
And I fill in "Password*" as ""
And I fill in "Confirm Password*" as ""
And I choose "Status" as "archived"
When I click "Save"
Then I should see "Manage Users" page with "User was successfully updated" notice
And I should observe Cathy updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment