Skip to content

Instantly share code, notes, and snippets.

Created April 24, 2015 20:22
Show Gist options
  • Save anonymous/4820d34e14e6d8cd66e8 to your computer and use it in GitHub Desktop.
Save anonymous/4820d34e14e6d8cd66e8 to your computer and use it in GitHub Desktop.
Feature: Payments
Scenario: A plan is created and invoice is issued
When a plan is created for "Company A" for $"12" and "12" seats with default reference "their reference"
And an unpaid invoice is issued for $"144" with reference "their reference"
Then the plan should be inactive
And the plan should be synced to stripe
Scenario: When a issue is created people should be notified
When an unpaid invoice is issued
Then an email should be sent to internal users containing a link to the invoice
And an email should be sent to the supervising user of the plan containing a link to the invoice
Scenario: When an invoice is created an page should be rendered
Given an unpaid invoice is issued
When the link in the email is clicked
Then a page showing the invoice should be created
Scenario: When an invoice is paid the plan should be active
Given an unpaid invoice is viewed
When the stripe form is filled out and submitted
Then the plan should become active
And the invoice should be marked paid
And an email issued confirming payment
Scenario: A user can pay a single item invoice
Given an unpaid single item invoice is issued and viewed
Then an email should be sent to the supervising user of the plan containing a link to the invoice
When the stripe form is filled out and submitted
Then the invoice should be marked paid
And an email issued confirming payment
Scenario: A user can be billed for a single item and a recurring amount
When a plan is created for $"12" and "12" seats and "5" pages of content at $"5"
Then an unpaid invoice is issued for $"169"
And an email should be sent to internal users containing a link to the invoice
And an email should be sent to the supervising user of the plan containing a link to the invoice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment