summaryrefslogtreecommitdiffstats
path: root/test/unit/query_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-14 06:59:31 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-14 06:59:31 +0000
commitd4edf7cda6ad9625e32ea208ade149757302e792 (patch)
treebe24fb2b7feb4cfdd9ebeccce06a0276fd62d4ab /test/unit/query_test.rb
parent62c65afd0037e2ee3abe343e7ec7e6e8df116f92 (diff)
downloadredmine-d4edf7cda6ad9625e32ea208ade149757302e792.tar.gz
redmine-d4edf7cda6ad9625e32ea208ade149757302e792.zip
Merged r20783 from trunk to 4.0-stable (#33548).
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@20785 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/query_test.rb')
-rw-r--r--test/unit/query_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index 597168fb8..6a059ca8e 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -1485,6 +1485,16 @@ class QueryTest < ActiveSupport::TestCase
assert !q.sortable_columns['cf_1']
end
+ def test_sortable_should_return_false_for_multi_custom_field
+ field = CustomField.find(1)
+ field.update_attribute :multiple, true
+
+ q = IssueQuery.new
+
+ field_column = q.available_columns.detect {|c| c.name==:cf_1}
+ assert !field_column.sortable?
+ end
+
def test_default_sort
q = IssueQuery.new
assert_equal [['id', 'desc']], q.sort_criteria