mirror of
https://github.com/redmine/redmine.git
synced 2026-08-04 23:50:21 +02: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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user