summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test/trackers_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-07-06 10:13:01 +0000
committerGo MAEDA <maeda@farend.jp>2021-07-06 10:13:01 +0000
commit4b661cca2914c8ae6771cf9906f8e526eae17349 (patch)
tree66c73aadeef6f5cc1f0badccac0603608bf71017 /test/integration/api_test/trackers_test.rb
parente3e616fa3753b9d09f1e939e577f7cdbd4d4c522 (diff)
downloadredmine-4b661cca2914c8ae6771cf9906f8e526eae17349.tar.gz
redmine-4b661cca2914c8ae6771cf9906f8e526eae17349.zip
Add enabled core fields to /trackers API response (#35505).
Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@21064 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test/trackers_test.rb')
-rw-r--r--test/integration/api_test/trackers_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/integration/api_test/trackers_test.rb b/test/integration/api_test/trackers_test.rb
index ca425f06d..e11632512 100644
--- a/test/integration/api_test/trackers_test.rb
+++ b/test/integration/api_test/trackers_test.rb
@@ -23,6 +23,7 @@ class Redmine::ApiTest::TrackersTest < Redmine::ApiTest::Base
fixtures :trackers
test "GET /trackers.xml should return trackers" do
+ Tracker.find(2).update_attribute :core_fields, %w[assigned_to_id due_date]
get '/trackers.xml'
assert_response :success
@@ -31,6 +32,11 @@ class Redmine::ApiTest::TrackersTest < Redmine::ApiTest::Base
assert_select 'trackers[type=array] tracker id', :text => '2' do
assert_select '~ name', :text => 'Feature request'
assert_select '~ description', :text => 'Description for Feature request tracker'
+ assert_select '~ enabled_standard_fields[type=array]' do
+ assert_select 'enabled_standard_fields>field', :count => 2
+ assert_select 'enabled_standard_fields>field', :text => 'assigned_to_id'
+ assert_select 'enabled_standard_fields>field', :text => 'due_date'
+ end
end
end
end