summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test/wiki_pages_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/api_test/wiki_pages_test.rb')
-rw-r--r--test/integration/api_test/wiki_pages_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/integration/api_test/wiki_pages_test.rb b/test/integration/api_test/wiki_pages_test.rb
index f9ec2bfe7..93db5aa51 100644
--- a/test/integration/api_test/wiki_pages_test.rb
+++ b/test/integration/api_test/wiki_pages_test.rb
@@ -181,4 +181,13 @@ class ApiTest::WikiPagesTest < ActionController::IntegrationTest
assert_equal 'New_subpage_from_API', page.title
assert_equal WikiPage.find(1), page.parent
end
+
+ test "DELETE /projects/:project_id/wiki/:title.xml should destroy the page" do
+ assert_difference 'WikiPage.count', -1 do
+ delete '/projects/ecookbook/wiki/CookBook_documentation.xml', {}, credentials('jsmith')
+ assert_response 200
+ end
+
+ assert_nil WikiPage.find_by_id(1)
+ end
end