diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-04-26 07:56:00 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-04-26 07:56:00 +0000 |
commit | 9fdd0862f74cb4b187fe7fe1422746702a4cb953 (patch) | |
tree | 8a7d2948ec7c3406c04bcbf59c39f80a1bee4931 | |
parent | ddd6ac8cd4d0613121a2ed79d3aca794ce5e59b0 (diff) | |
download | redmine-9fdd0862f74cb4b187fe7fe1422746702a4cb953.tar.gz redmine-9fdd0862f74cb4b187fe7fe1422746702a4cb953.zip |
Missing type=array attributes in custom fields API (#16739).
git-svn-id: http://svn.redmine.org/redmine/trunk@13109 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/custom_fields/index.api.rsb | 4 | ||||
-rw-r--r-- | test/integration/api_test/custom_fields_test.rb | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/views/custom_fields/index.api.rsb b/app/views/custom_fields/index.api.rsb index 902edff16..77c9cf3b3 100644 --- a/app/views/custom_fields/index.api.rsb +++ b/app/views/custom_fields/index.api.rsb @@ -27,12 +27,12 @@ api.array :custom_fields do end if field.is_a?(IssueCustomField) - api.trackers do + api.array :trackers do field.trackers.each do |tracker| api.tracker :id => tracker.id, :name => tracker.name end end - api.roles do + api.array :roles do field.roles.each do |role| api.role :id => role.id, :name => role.name end diff --git a/test/integration/api_test/custom_fields_test.rb b/test/integration/api_test/custom_fields_test.rb index 3b5bbdd35..4ef6fc707 100644 --- a/test/integration/api_test/custom_fields_test.rb +++ b/test/integration/api_test/custom_fields_test.rb @@ -37,6 +37,8 @@ class Redmine::ApiTest::CustomFieldsTest < Redmine::ApiTest::Base assert_select 'possible_values[type=array]' do assert_select 'possible_value>value', :text => 'PostgreSQL' end + assert_select 'trackers[type=array]' + assert_select 'roles[type=array]' end end end |