summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/unit/query_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index 4a4361fe9..3fa1da1f9 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -659,11 +659,15 @@ class QueryTest < ActiveSupport::TestCase
end
def test_operator_tomorrow
+ issue = Issue.generate!(:due_date => User.current.today.tomorrow)
+ other_issues = []
+ other_issues << Issue.generate!(:due_date => User.current.today.yesterday)
+ other_issues << Issue.generate!(:due_date => User.current.today + 2)
query = IssueQuery.new(:project => Project.find(1), :name => '_')
query.add_filter('due_date', 'nd', [''])
issues = find_issues_with_query(query)
- assert !issues.empty?
- issues.each {|issue| assert_equal Date.today.tomorrow, issue.due_date}
+ assert_include issue, issues
+ other_issues.each {|i| assert_not_include i, issues }
end
def test_operator_date_periods