diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/helpers/queries_helper_test.rb | 12 |
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 |