##// 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 8 api.description version.description
9 9 api.status version.status
10 10 api.due_date version.effective_date
11 api.sharing version.sharing
11 12
12 13 render_api_custom_values version.custom_field_values, api
13 14
@@ -6,6 +6,7 api.version do
6 6 api.description @version.description
7 7 api.status @version.status
8 8 api.due_date @version.effective_date
9 api.sharing @version.sharing
9 10
10 11 render_api_custom_values @version.custom_field_values, api
11 12
@@ -103,15 +103,11 class ApiTest::VersionsTest < ActionController::IntegrationTest
103 103
104 104 assert_response :success
105 105 assert_equal 'application/xml', @response.content_type
106 assert_tag 'version',
107 :child => {
108 :tag => 'id',
109 :content => '2',
110 :sibling => {
111 :tag => 'name',
112 :content => '1.0'
113 }
114 }
106 assert_select 'version' do
107 assert_select 'id', :text => '2'
108 assert_select 'name', :text => '1.0'
109 assert_select 'sharing', :text => 'none'
110 end
115 111 end
116 112 end
117 113
General Comments 0
You need to be logged in to leave comments. Login now