Browse Source

Add test for #39714.

git-svn-id: https://svn.redmine.org/redmine/trunk@22479 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/147/head
Marius Balteanu 6 months ago
parent
commit
10d667f6dd
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      test/helpers/queries_helper_test.rb

+ 12
- 0
test/helpers/queries_helper_test.rb View File

@@ -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

Loading…
Cancel
Save