Missing type=array attributes in custom fields API (#16739).

git-svn-id: http://svn.redmine.org/redmine/trunk@13109 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-04-26 07:56:00 +00:00
parent ddd6ac8cd4
commit 9fdd0862f7
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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