From eb3e79b70ddeae1e0ba168f7eb616e36e1e476d6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 6 Sep 2012 17:07:49 +0000 Subject: [PATCH] Merged r10148 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@10295 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/versions/index.api.rsb | 1 + app/views/versions/show.api.rsb | 1 + test/integration/api_test/versions_test.rb | 14 +++++--------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/views/versions/index.api.rsb b/app/views/versions/index.api.rsb index 3a262550b..3adde2b98 100644 --- a/app/views/versions/index.api.rsb +++ b/app/views/versions/index.api.rsb @@ -8,6 +8,7 @@ api.array :versions, api_meta(:total_count => @versions.size) do api.description version.description api.status version.status api.due_date version.effective_date + api.sharing version.sharing render_api_custom_values version.custom_field_values, api diff --git a/app/views/versions/show.api.rsb b/app/views/versions/show.api.rsb index 08ba00cf3..63bf2d379 100644 --- a/app/views/versions/show.api.rsb +++ b/app/views/versions/show.api.rsb @@ -6,6 +6,7 @@ api.version do api.description @version.description api.status @version.status api.due_date @version.effective_date + api.sharing @version.sharing render_api_custom_values @version.custom_field_values, api diff --git a/test/integration/api_test/versions_test.rb b/test/integration/api_test/versions_test.rb index 3ad5ebf40..6115973d5 100644 --- a/test/integration/api_test/versions_test.rb +++ b/test/integration/api_test/versions_test.rb @@ -103,15 +103,11 @@ class ApiTest::VersionsTest < ActionController::IntegrationTest assert_response :success assert_equal 'application/xml', @response.content_type - assert_tag 'version', - :child => { - :tag => 'id', - :content => '2', - :sibling => { - :tag => 'name', - :content => '1.0' - } - } + assert_select 'version' do + assert_select 'id', :text => '2' + assert_select 'name', :text => '1.0' + assert_select 'sharing', :text => 'none' + end end end