]> source.dussan.org Git - redmine.git/commitdiff
Merged r19364 from trunk to 4.1-stable (#32546).
authorGo MAEDA <maeda@farend.jp>
Fri, 13 Dec 2019 00:36:35 +0000 (00:36 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 13 Dec 2019 00:36:35 +0000 (00:36 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19370 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/query_test.rb

index 3ccfc753a33044b72242b97aa62d0e2345fdbdbd..9e97a4744c9a8b134e34e6d4d3ad2bfde7e5ed88 100644 (file)
@@ -1153,6 +1153,10 @@ class QueryTest < ActiveSupport::TestCase
     query = IssueQuery.new(:name => '_')
     query.filters = {"relates" => {:operator => '=', :values => ['2']}}
     assert_equal [1], find_issues_with_query(query).map(&:id).sort
+
+    query = IssueQuery.new(:name => '_')
+    query.filters = {"relates" => {:operator => '!', :values => ['1']}}
+    assert_equal Issue.where.not(:id => [2, 3]).order(:id).ids, find_issues_with_query(query).map(&:id).sort
   end
 
   def test_filter_on_relations_with_any_issues_in_a_project