diff --git a/app/controllers/locomotive/api/pages_controller.rb b/app/controllers/locomotive/api/pages_controller.rb index 6e6001cf..0af07e37 100644 --- a/app/controllers/locomotive/api/pages_controller.rb +++ b/app/controllers/locomotive/api/pages_controller.rb @@ -25,6 +25,12 @@ module Locomotive respond_with @page, :location => main_app.locomotive_api_pages_url end + def destroy + @page = current_site.pages.find(params[:id]) + @page.destroy + respond_with @page + end + end end diff --git a/features/api/authorization/pages.feature b/features/api/authorization/pages.feature index c9d0f41d..14b3170e 100644 --- a/features/api/authorization/pages.feature +++ b/features/api/authorization/pages.feature @@ -211,5 +211,4 @@ Feature: Pages 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 + Then the JSON response should be an access denied error