From 30fc2db8cbb743b4a6ca446c8803b4b3024a1a7e Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Fri, 13 Dec 2019 00:36:35 +0000 Subject: [PATCH] Merged r19364 from trunk to 4.1-stable (#32546). git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19370 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/query_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 3ccfc753a..9e97a4744 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -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 -- 2.39.5