1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-10-17 17:01:01 +00:00

Support "active" attribute in Enumerations REST API (#31559).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18325 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2019-06-30 05:57:52 +00:00
parent dd2af7fc22
commit 5c9447fd63
2 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,7 @@ api.array @klass.name.underscore.pluralize do
api.id enumeration.id
api.name enumeration.name
api.is_default enumeration.is_default
api.active enumeration.active
render_api_custom_values enumeration.visible_custom_field_values, api
end
end

View File

@ -27,9 +27,15 @@ class Redmine::ApiTest::EnumerationsTest < Redmine::ApiTest::Base
assert_response :success
assert_equal 'application/xml', response.content_type
assert_select 'issue_priorities[type=array]' do
assert_select 'issue_priority' do
assert_select 'issue_priority:nth-of-type(3)' do
assert_select 'id', :text => '6'
assert_select 'name', :text => 'High'
assert_select 'active', :text => 'true'
end
assert_select 'issue_priority:nth-of-type(6)' do
assert_select 'id', :text => '15'
assert_select 'name', :text => 'Inactive Priority'
assert_select 'active', :text => 'false'
end
end
end