summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-04-02 07:55:39 +0000
committerGo MAEDA <maeda@farend.jp>2020-04-02 07:55:39 +0000
commit0bf775e77c2bf5229f457e6310603f49b473f819 (patch)
tree979852b6e7044905c5d9937ab4285c0365378121 /test/unit
parente1cb1c8530eeef2820dafd7429196163b1a98862 (diff)
downloadredmine-0bf775e77c2bf5229f457e6310603f49b473f819.tar.gz
redmine-0bf775e77c2bf5229f457e6310603f49b473f819.zip
Merged r19636 from trunk to 4.1-stable (#32737).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19638 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/query_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index c7d805571..cc5a23530 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -1638,12 +1638,12 @@ class QueryTest < ActiveSupport::TestCase
def test_sort_criteria_should_have_only_first_three_elements
q = IssueQuery.new
q.sort_criteria = [['priority', 'desc'], ['tracker', 'asc'], ['priority', 'asc'], ['id', 'asc'], ['project', 'asc'], ['subject', 'asc']]
- assert_equal [['priority', 'desc'], ['tracker', 'asc'], ['priority', 'asc']], q.sort_criteria
+ assert_equal [['priority', 'desc'], ['tracker', 'asc'], ['id', 'asc']], q.sort_criteria
end
- def test_sort_criteria_should_remove_blank_keys
+ def test_sort_criteria_should_remove_blank_or_duplicate_keys
q = IssueQuery.new
- q.sort_criteria = [['priority', 'desc'], [nil, 'desc'], ['', 'asc'], ['project', 'asc']]
+ q.sort_criteria = [['priority', 'desc'], [nil, 'desc'], ['', 'asc'], ['priority', 'asc'], ['project', 'asc']]
assert_equal [['priority', 'desc'], ['project', 'asc']], q.sort_criteria
end