From 699a75910db7e7e4caafaee19808a8a80d9acceb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 6 May 2016 18:59:36 +0000 Subject: Filter by issue id (#4806). A shortcut is added to the context menu to filter the selected issues. git-svn-id: http://svn.redmine.org/redmine/trunk@15371 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/query_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/unit') diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index cb01bcba8..588f5fafd 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -235,6 +235,14 @@ class QueryTest < ActiveSupport::TestCase assert_equal 2, issues.first.id end + def test_operator_is_on_integer_should_accept_comma_separated_values + query = IssueQuery.new(:name => '_') + query.add_filter("issue_id", '=', ['1,3']) + issues = find_issues_with_query(query) + assert_equal 2, issues.size + assert_equal [1,3], issues.map(&:id).sort + end + def test_operator_is_on_integer_custom_field f = IssueCustomField.create!(:name => 'filter', :field_format => 'int', :is_for_all => true, :is_filter => true, :trackers => Tracker.all) CustomValue.create!(:custom_field => f, :customized => Issue.find(1), :value => '7') -- cgit v1.2.3