##// END OF EJS Templates
Adds sharing attribute to the versions API (#11541)....
Jean-Philippe Lang -
r9965:b603aa74f9ea
parent child
Show More
@@ -8,6 +8,7 api.array :versions, api_meta(:total_count => @versions.size) do
8 api.description version.description
8 api.description version.description
9 api.status version.status
9 api.status version.status
10 api.due_date version.effective_date
10 api.due_date version.effective_date
11 api.sharing version.sharing
11
12
12 render_api_custom_values version.custom_field_values, api
13 render_api_custom_values version.custom_field_values, api
13
14
@@ -6,6 +6,7 api.version do
6 api.description @version.description
6 api.description @version.description
7 api.status @version.status
7 api.status @version.status
8 api.due_date @version.effective_date
8 api.due_date @version.effective_date
9 api.sharing @version.sharing
9
10
10 render_api_custom_values @version.custom_field_values, api
11 render_api_custom_values @version.custom_field_values, api
11
12
@@ -103,15 +103,11 class ApiTest::VersionsTest < ActionController::IntegrationTest
103
103
104 assert_response :success
104 assert_response :success
105 assert_equal 'application/xml', @response.content_type
105 assert_equal 'application/xml', @response.content_type
106 assert_tag 'version',
106 assert_select 'version' do
107 :child => {
107 assert_select 'id', :text => '2'
108 :tag => 'id',
108 assert_select 'name', :text => '1.0'
109 :content => '2',
109 assert_select 'sharing', :text => 'none'
110 :sibling => {
110 end
111 :tag => 'name',
112 :content => '1.0'
113 }
114 }
115 end
111 end
116 end
112 end
117
113
General Comments 0
You need to be logged in to leave comments. Login now