summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-11-26 13:57:25 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-11-26 13:57:25 +0000
commitb2b2dff94179f12a7839a7226c2455010484446d (patch)
treebe6212d9ebac62261b26c800391387650262d43b /test
parent9575af8c83f1c14cc9f401207703d66a83a7675e (diff)
downloadredmine-b2b2dff94179f12a7839a7226c2455010484446d.tar.gz
redmine-b2b2dff94179f12a7839a7226c2455010484446d.zip
Merged r22478 to r22479from trunk to 5.1-stable (#39714).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22481 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/helpers/queries_helper_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/helpers/queries_helper_test.rb b/test/helpers/queries_helper_test.rb
index b2943bd03..8c2fd1cb3 100644
--- a/test/helpers/queries_helper_test.rb
+++ b/test/helpers/queries_helper_test.rb
@@ -105,4 +105,16 @@ class QueriesHelperTest < Redmine::HelperTest
assert_include "Non", csv
end
end
+
+ def test_filters_options_for_select_should_group_custom_field_relations
+ i_cf = IssueCustomField.generate!(field_format: 'user', name: 'User', is_for_all: true, trackers: Tracker.all, is_filter: true)
+ u_cf = UserCustomField.find(4)
+ u_cf.is_filter = true
+ u_cf.save
+
+ options = filters_options_for_select(IssueQuery.new)
+
+ assert_select_in options, 'option[value=?]', "cf_#{i_cf.id}.cf_#{u_cf.id}", text: "User's Phone number"
+ assert_select_in options, 'optgroup[label=?]', 'User', 1
+ end
end