Created
March 13, 2012 01:40
-
-
Save ogredude/2026083 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Offer Notifications | |
Background: | |
Given there are the following users: | |
| email | | |
| bob@mythingy.com | | |
| alice@mythingy.com | | |
Given a clear email queue | |
And "alice@mythingy.com" has created an Offer: | |
| description | | |
| Alice's offer | | |
And "bob@mythingy.com" has created a Request: | |
| description | | |
| Bob's request | | |
Given I am signed in as "bob@mythingy.com" | |
And I am on the homepage | |
@google_maps_api | |
Scenario: Offer owner is notified when someone joins ride | |
When I follow "My Requests" | |
And I follow "Details" within "#request_1" | |
And I follow "Apply to this offer" within "#offer_1" | |
Then I should see "You have applied to join offer #1" | |
And "alice@mythingy.com" should receive an email | |
When "alice@mythingy.com" opens the email | |
Then they should see "has applied to join your ride" in the email body | |
@google_maps_api | |
Scenario: Request owner is notified when application is accepted | |
When I follow "My Requests" | |
And I follow "Details" within "#request_1" | |
And I follow "Apply to this offer" within "#offer_1" | |
Then I should see "You have applied to join offer #1" | |
And "alice@mythingy.com" should receive an email | |
When "alice@mythingy.com" opens the email | |
Then they should see "has applied to join your ride" in the email body | |
When I follow "Log out" | |
Given I am signed in as "alice@mythingy.com" | |
When I follow "My Offers" | |
And I follow "Details" within "#offer_1" | |
And I follow "Approve Rider" | |
Then I should see "This rider has been approved!" | |
And "bob@mythingy.com" should receive an email | |
When "bob@mythingy.com" opens the email | |
Then they should see "has approved your request to join" in the email body | |
@google_maps_api | |
Scenario: Request owner is notified when application is declined | |
When I follow "My Requests" | |
And I follow "Details" within "#request_1" | |
And I follow "Apply to this offer" within "#offer_1" | |
Then I should see "You have applied to join offer #1" | |
And "alice@mythingy.com" should receive an email | |
When "alice@mythingy.com" opens the email | |
Then they should see "has applied to join your ride" in the email body | |
When I follow "Log out" | |
Given I am signed in as "alice@mythingy.com" | |
When I follow "My Offers" | |
And I follow "Details" within "#offer_1" | |
And I follow "Decline Rider" | |
Then I should see "This rider's application has been denied." | |
And "bob@mythingy.com" should receive an email | |
When "bob@mythingy.com" opens the email | |
Then they should see "has declined your request to join" in the email body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Offer Notifications | |
Background: | |
Given there are the following users: | |
| email | | |
| bob@mythingy.com | | |
| alice@mythingy.com | | |
Given a clear email queue | |
And "alice@mythingy.com" has created an Offer: | |
| description | | |
| Alice's offer | | |
And "bob@mythingy.com" has created a Request: | |
| description | | |
| Bob's request | | |
Given I am signed in as "bob@mythingy.com" | |
And I am on the homepage | |
@google_maps_api | |
Scenario Outline: Notifications | |
When I follow "My Requests" | |
And I follow "Details" within "#request_1" | |
And I follow "Apply to this offer" within "#offer_1" | |
Then I should see "You have applied to join offer #1" | |
And "alice@mythingy.com" should receive an email | |
When "alice@mythingy.com" opens the email | |
Then they should see "has applied to join your ride" in the email body | |
When I follow "Log out" | |
Given I am signed in as "alice@mythingy.com" | |
When I follow "My Offers" | |
And I follow "Details" within "#offer_1" | |
And I follow <link> | |
Then I should see <flash_message> | |
And "bob@mythingy.com" should receive an email | |
When "bob@mythingy.com" opens the email | |
Then they should see <email_text> in the email body | |
Examples: | |
| link | flash_message | email_text | | |
| "Approve Rider" | "This rider has been approved!" | "has approved your request to join" | | |
| "Decline Rider" | "This rider's application has been denied." | "has declined your request to join" | | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment