Skip to content

Instantly share code, notes, and snippets.

@phillipkoebbe
Created February 3, 2010 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phillipkoebbe/294011 to your computer and use it in GitHub Desktop.
Save phillipkoebbe/294011 to your computer and use it in GitHub Desktop.
Feature: Registration Email Validation
Background:
Given I am not logged in
And I am on the register page
@1
Scenario Outline: A new registration - variations of valid emails
When I fill in user_first_name with 'New'
And I fill in user_last_name with 'User'
And I fill in user_address_1 with '123 Some Road'
And I fill in user_city with 'Some City'
And I select 'ILLINOIS' from user_state
And I fill in user_zip_code with '12345'
And I fill in user_email with '<email>'
And I fill in user_password with 'my_password'
And I fill in user_password_confirmation with 'my_password'
And I set the counties_all radio
And I click the register button
Then I should get the REGISTRATION_SUCCESSFUL message
And a message should be sent
Examples:
| email |
| user@example.com |
| user@example.ca |
| user_1@example.com |
| user.1@example.com |
| user+1@example.com |
| user-1@example.com |
| user%1@example.com |
| user_one@example.com |
| user.one@example.com |
| user+one@example.com |
| user-one@example.com |
| user%one@example.com |
| 1234567890@example.com |
| user@mail.example.com |
@2
Scenario Outline: A new registration - variations of invalid emails
When I fill in user_first_name with 'New'
And I fill in user_last_name with 'User'
And I fill in user_address_1 with '123 Some Road'
And I fill in user_city with 'Some City'
And I select 'ILLINOIS' from user_state
And I fill in user_zip_code with '12345'
And I fill in user_email with '<email>'
And I fill in user_password with 'my_password'
And I fill in user_password_confirmation with 'my_password'
And I set the counties_all radio
And I click the register button
Then I should not get the REGISTRATION_SUCCESSFUL message
And I should see "Email is invalid"
And a message should not be sent
Examples:
| email |
| user!@example.com |
| user@example |
| user one@example.com |
| @example.com |
| .user@example.com |
| _user@example.com |
| -user@example.com |
| +user@example.com |
| user@mail.example.company |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment