mirror of
https://github.com/redmine/redmine.git
synced 2025-11-18 03:00:52 +01:00
Add attachment information to issues.xml in REST API (#12181).
git-svn-id: http://svn.redmine.org/redmine/trunk@16360 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -82,6 +82,22 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
|
||||
end
|
||||
end
|
||||
|
||||
test "GET /issues.xml with attachments" do
|
||||
get '/issues.xml?include=attachments'
|
||||
|
||||
assert_response :success
|
||||
assert_equal 'application/xml', @response.content_type
|
||||
|
||||
assert_select 'issue id', :text => '3' do
|
||||
assert_select '~ attachments attachment', 4
|
||||
end
|
||||
|
||||
assert_select 'issue id', :text => '1' do
|
||||
assert_select '~ attachments'
|
||||
assert_select '~ attachments attachment', 0
|
||||
end
|
||||
end
|
||||
|
||||
test "GET /issues.xml with invalid query params" do
|
||||
get '/issues.xml', {:f => ['start_date'], :op => {:start_date => '='}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user