summaryrefslogtreecommitdiffstats
path: root/test/unit/query_test.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-06-19 19:30:13 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-06-19 19:30:13 +0000
commit6f5920e4cb1e4c69942a7a370d3da06479137ab7 (patch)
tree3980f5d70ea26cdb4f16682fd1cf85a0cc4e7c99 /test/unit/query_test.rb
parent998cbf4890916ab7f3da68ddc39bf35592196eac (diff)
downloadredmine-6f5920e4cb1e4c69942a7a370d3da06479137ab7.tar.gz
redmine-6f5920e4cb1e4c69942a7a370d3da06479137ab7.zip
Fix failing test caused by r21646 (#37255).
git-svn-id: https://svn.redmine.org/redmine/trunk@21657 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/query_test.rb')
-rw-r--r--test/unit/query_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index d6f7922a1..dbf95519f 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -1129,14 +1129,15 @@ class QueryTest < ActiveSupport::TestCase
def test_filter_on_custom_field_should_ignore_projects_with_field_disabled
field =
IssueCustomField.generate!(
- :trackers => Tracker.all, :project_ids => [1, 3, 4],
+ :trackers => Tracker.all, :project_ids => [1, 3, 5],
:is_for_all => false, :is_filter => true
)
Issue.generate!(:project_id => 3, :tracker_id => 2,
:custom_field_values => {field.id.to_s => 'Foo'})
- Issue.generate!(:project_id => 4, :tracker_id => 2,
+ Issue.generate!(:project_id => 5, :tracker_id => 2,
:custom_field_values => {field.id.to_s => 'Foo'})
+ User.current = User.find(1)
query = IssueQuery.new(:name => '_', :project => Project.find(1))
query.filters = {"cf_#{field.id}" => {:operator => '=', :values => ['Foo']}}
assert_equal 2, find_issues_with_query(query).size