From: Go MAEDA Date: Fri, 13 Dec 2019 00:36:35 +0000 (+0000) Subject: Merged r19364 from trunk to 4.1-stable (#32546). X-Git-Tag: 4.1.0~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=30fc2db8cbb743b4a6ca446c8803b4b3024a1a7e;p=redmine.git 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 --- 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