summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-05-06 18:59:36 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-05-06 18:59:36 +0000
commit699a75910db7e7e4caafaee19808a8a80d9acceb (patch)
tree973755cce7a6c567292024b4e6d1f7bf146423f0 /test/unit
parent860ae0631ad5514a08db6ac980c1b0ff3bbb170a (diff)
downloadredmine-699a75910db7e7e4caafaee19808a8a80d9acceb.tar.gz
redmine-699a75910db7e7e4caafaee19808a8a80d9acceb.zip
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
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/query_test.rb8
1 files changed, 8 insertions, 0 deletions
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')