From b2b2dff94179f12a7839a7226c2455010484446d Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 26 Nov 2023 13:57:25 +0000 Subject: 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 --- test/helpers/queries_helper_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') 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 -- cgit v1.2.3