summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-06-30 09:20:09 +0000
committerGo MAEDA <maeda@farend.jp>2023-06-30 09:20:09 +0000
commit66f16ff3485bcf6f65f57f971e086dbd6066b4a4 (patch)
treeec0c63ce19dc3e413048a60694d82649e5ce0312 /test/integration/api_test
parent945a82b5c0aad6bd6af656865015277d3e0e612b (diff)
downloadredmine-66f16ff3485bcf6f65f57f971e086dbd6066b4a4.tar.gz
redmine-66f16ff3485bcf6f65f57f971e086dbd6066b4a4.zip
Unable to retrieve custom fields set as "For all projects" via Projects API (#38668).
Patch by Hirokazu Onozato. git-svn-id: https://svn.redmine.org/redmine/trunk@22270 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test')
-rw-r--r--test/integration/api_test/projects_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/integration/api_test/projects_test.rb b/test/integration/api_test/projects_test.rb
index f0c1973cb..c32f7679b 100644
--- a/test/integration/api_test/projects_test.rb
+++ b/test/integration/api_test/projects_test.rb
@@ -86,11 +86,16 @@ class Redmine::ApiTest::ProjectsTest < Redmine::ApiTest::Base
end
test "GET /projects.xml with include=issue_custom_fields should return custom fields" do
+ IssueCustomField.find(6).update_attribute :is_for_all, true
+ IssueCustomField.find(8).update_attribute :is_for_all, false
get '/projects.xml?include=issue_custom_fields'
assert_response :success
assert_equal 'application/xml', @response.media_type
assert_select 'issue_custom_fields[type=array] custom_field[name="Project 1 cf"]'
+ # Custom field for all projects
+ assert_select 'issue_custom_fields[type=array] custom_field[id="6"]'
+ assert_select 'issue_custom_fields[type=array] custom_field[id="8"]', 0
end
test "GET /projects/:id.xml should return the project" do