From 03062394fcad0d9e12bec5e97b3129406157694e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 25 Oct 2012 20:44:37 +0000 Subject: Adds ?include=attachments option when retrieving a wiki page with the REST API (#7082). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10718 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/api_test/wiki_pages_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/integration') diff --git a/test/integration/api_test/wiki_pages_test.rb b/test/integration/api_test/wiki_pages_test.rb index 828e139ea..ac4f132e0 100644 --- a/test/integration/api_test/wiki_pages_test.rb +++ b/test/integration/api_test/wiki_pages_test.rb @@ -59,6 +59,21 @@ class ApiTest::WikiPagesTest < ActionController::IntegrationTest end end + test "GET /projects/:project_id/wiki/:title.xml?include=attachments should include attachments" do + get '/projects/ecookbook/wiki/Page_with_an_inline_image.xml?include=attachments' + assert_response 200 + assert_equal 'application/xml', response.content_type + assert_select 'wiki_page' do + assert_select 'title', :text => 'Page_with_an_inline_image' + assert_select 'attachments[type=array]' do + assert_select 'attachment' do + assert_select 'id', :text => '3' + assert_select 'filename', :text => 'logo.gif' + end + end + end + end + test "GET /projects/:project_id/wiki/:title.xml with unknown title and edit permission should respond with 404" do get '/projects/ecookbook/wiki/Invalid_Page.xml', {}, credentials('jsmith') assert_response 404 -- cgit v1.2.3