From f53ab18f90d6461f61d9973934fb7fa21353ad8f Mon Sep 17 00:00:00 2001 From: Alex Sanford Date: Tue, 24 Apr 2012 12:04:24 -0300 Subject: [PATCH] Added features for destroying pages --- features/api/authorization/pages.feature | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/features/api/authorization/pages.feature b/features/api/authorization/pages.feature index 02619255..c9d0f41d 100644 --- a/features/api/authorization/pages.feature +++ b/features/api/authorization/pages.feature @@ -187,3 +187,29 @@ Feature: Pages "title": "Brand new updated title" } """ + + # destroy page + + Scenario: Destroying page as an Admin + Given I have an "admin" token + When I do an API GET request to pages.json + Then the JSON response should contain 4 pages + When I do an API DELETE to pages/4f832c2cb0d86d3f42fffffe.json + When I do an API GET request to pages.json + Then the JSON response should contain 3 pages + + Scenario: Destroying page as a Designer + Given I have a "designer" token + When I do an API GET request to pages.json + Then the JSON response should contain 4 pages + When I do an API DELETE to pages/4f832c2cb0d86d3f42fffffe.json + When I do an API GET request to pages.json + Then the JSON response should contain 3 pages + + Scenario: Deleting page as an Author + Given I have a "author" token + When I do an API GET request to pages.json + Then the JSON response should contain 4 pages + When I do an API DELETE to pages/4f832c2cb0d86d3f42fffffe.json + When I do an API GET request to pages.json + Then the JSON response should contain 3 pages