diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-25 20:44:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-25 20:44:37 +0000 |
commit | 03062394fcad0d9e12bec5e97b3129406157694e (patch) | |
tree | 3f1e13b7b1ae4a97ca3d999b53b80e4710624990 /test/integration | |
parent | eff874b29a908e85e80d8bcd6a20fd85165e59cd (diff) | |
download | redmine-03062394fcad0d9e12bec5e97b3129406157694e.tar.gz redmine-03062394fcad0d9e12bec5e97b3129406157694e.zip |
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
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/wiki_pages_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 |