Created
September 10, 2010 13:50
-
-
Save moklett/573658 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Scenario: Clear site data for a test site | |
Given my site is in test mode | |
And I have 2 products | |
And I have 4 subscriptions | |
When I send a POST request to https://[@subdomain].chargify.com/sites/clear_data.json | |
Then the response status should be "200 OK" | |
And I should have 0 products | |
And I should have 0 subscriptions | |
Scenario: Attempt to clear site data for a production site | |
Given my site is in production mode | |
And I have 2 products | |
And I have 4 subscriptions | |
When I send a POST request to https://[@subdomain].chargify.com/sites/clear_data.json | |
Then the response status should be "403 Forbidden" | |
And I should have 2 products | |
And I should have 4 subscriptions | |
Scenario: Clear site data for a test site, leaving products | |
Given my site is in test mode | |
And I have 2 products | |
And I have 4 subscriptions | |
When I send a POST request to https://[@subdomain].chargify.com/sites/clear_data.json?cleanup_scope=customers | |
Then the response status should be "200 OK" | |
And I should have 2 products | |
And I should have 0 subscriptions | |
Scenario: Clear all site data for a test site using the explicit 'all' scope | |
Given my site is in test mode | |
And I have 2 products | |
And I have 4 subscriptions | |
When I send a POST request to https://[@subdomain].chargify.com/sites/clear_data.json?cleanup_scope=all | |
Then the response status should be "200 OK" | |
And I should have 0 products | |
And I should have 0 subscriptions | |
Scenario: Attempt to clear site data for a test site using a bogus scope | |
Given my site is in test mode | |
And I have 2 products | |
And I have 4 subscriptions | |
When I send a POST request to https://[@subdomain].chargify.com/sites/clear_data.json?cleanup_scope=bogus | |
Then the response status should be "403 Forbidden" | |
And I should have 2 products | |
And I should have 4 subscriptions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment