Created
September 10, 2010 13:50
Revisions
-
moklett created this gist
Sep 10, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ 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