summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-14 03:14:49 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-14 03:14:49 +0000
commit83f3f454970870696b1b4acccafc30a0ca957f3f (patch)
treea9fd4506eb476a651fab7a2ad4d87a5fa9ca4806 /test
parent5063d3faf0057e9cdb24556b6908aa6fc2bec77b (diff)
downloadredmine-83f3f454970870696b1b4acccafc30a0ca957f3f.tar.gz
redmine-83f3f454970870696b1b4acccafc30a0ca957f3f.zip
Fix that column header is clickable even when the column is not actually sortable (#33548).
Patch by Vincent Robert and Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20783 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-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 a6dff724c..f590cd4dc 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -1707,6 +1707,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