summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-31 16:55:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-31 16:55:53 +0000
commit62f9b56c1e6973f204ed289f96136db6a74b8b5b (patch)
tree5a211b1297202e1723849e397a6cca856e5d04d5 /test/unit
parentea40ce8ba93ba5525594c0ef1edcad9482223e92 (diff)
downloadredmine-62f9b56c1e6973f204ed289f96136db6a74b8b5b.tar.gz
redmine-62f9b56c1e6973f204ed289f96136db6a74b8b5b.zip
Merged r15751 (#23596).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15770 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/query_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index 2515624d8..206677c26 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -235,7 +235,7 @@ class QueryTest < ActiveSupport::TestCase
assert_equal 2, issues.first.id
end
- def test_operator_is_on_integer_should_accept_comma_separated_values
+ def test_operator_is_on_issue_id_should_accept_comma_separated_values
query = IssueQuery.new(:name => '_')
query.add_filter("issue_id", '=', ['1,3'])
issues = find_issues_with_query(query)
@@ -243,6 +243,14 @@ class QueryTest < ActiveSupport::TestCase
assert_equal [1,3], issues.map(&:id).sort
end
+ def test_operator_between_on_issue_id_should_return_range
+ query = IssueQuery.new(:name => '_')
+ query.add_filter("issue_id", '><', ['2','3'])
+ issues = find_issues_with_query(query)
+ assert_equal 2, issues.size
+ assert_equal [2,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')