mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 09:16:02 +01:00
Fix the test (#4502).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17942 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -659,11 +659,15 @@ class QueryTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_operator_tomorrow
|
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 = IssueQuery.new(:project => Project.find(1), :name => '_')
|
||||||
query.add_filter('due_date', 'nd', [''])
|
query.add_filter('due_date', 'nd', [''])
|
||||||
issues = find_issues_with_query(query)
|
issues = find_issues_with_query(query)
|
||||||
assert !issues.empty?
|
assert_include issue, issues
|
||||||
issues.each {|issue| assert_equal Date.today.tomorrow, issue.due_date}
|
other_issues.each {|i| assert_not_include i, issues }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_operator_date_periods
|
def test_operator_date_periods
|
||||||
|
|||||||
Reference in New Issue
Block a user