Adds sharing attribute to the versions API (#11541).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10148 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
c57a2974d1
commit
b603aa74f9
@ -8,6 +8,7 @@ api.array :versions, api_meta(:total_count => @versions.size) do
|
|||||||
api.description version.description
|
api.description version.description
|
||||||
api.status version.status
|
api.status version.status
|
||||||
api.due_date version.effective_date
|
api.due_date version.effective_date
|
||||||
|
api.sharing version.sharing
|
||||||
|
|
||||||
render_api_custom_values version.custom_field_values, api
|
render_api_custom_values version.custom_field_values, api
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ api.version do
|
|||||||
api.description @version.description
|
api.description @version.description
|
||||||
api.status @version.status
|
api.status @version.status
|
||||||
api.due_date @version.effective_date
|
api.due_date @version.effective_date
|
||||||
|
api.sharing @version.sharing
|
||||||
|
|
||||||
render_api_custom_values @version.custom_field_values, api
|
render_api_custom_values @version.custom_field_values, api
|
||||||
|
|
||||||
|
@ -103,15 +103,11 @@ class ApiTest::VersionsTest < ActionController::IntegrationTest
|
|||||||
|
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'application/xml', @response.content_type
|
assert_equal 'application/xml', @response.content_type
|
||||||
assert_tag 'version',
|
assert_select 'version' do
|
||||||
:child => {
|
assert_select 'id', :text => '2'
|
||||||
:tag => 'id',
|
assert_select 'name', :text => '1.0'
|
||||||
:content => '2',
|
assert_select 'sharing', :text => 'none'
|
||||||
:sibling => {
|
end
|
||||||
:tag => 'name',
|
|
||||||
:content => '1.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user