Added destroy API method for pages and fixed feature
This commit is contained in:
parent
f53ab18f90
commit
bf65fa47f3
@ -25,6 +25,12 @@ module Locomotive
|
|||||||
respond_with @page, :location => main_app.locomotive_api_pages_url
|
respond_with @page, :location => main_app.locomotive_api_pages_url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@page = current_site.pages.find(params[:id])
|
||||||
|
@page.destroy
|
||||||
|
respond_with @page
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -211,5 +211,4 @@ Feature: Pages
|
|||||||
When I do an API GET request to pages.json
|
When I do an API GET request to pages.json
|
||||||
Then the JSON response should contain 4 pages
|
Then the JSON response should contain 4 pages
|
||||||
When I do an API DELETE to pages/4f832c2cb0d86d3f42fffffe.json
|
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 be an access denied error
|
||||||
Then the JSON response should contain 3 pages
|
|
||||||
|
Loading…
Reference in New Issue
Block a user