From ec8d5892467a476e980016700510f87477b3e123 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 9 Aug 2017 06:36:29 +0000 Subject: [PATCH] Merged r16938 from trunk to 3.4-stable (#22320) try IssueTest#test_overdue failing on CI server at Japanese daytime. git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@16951 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_test.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 39d9de879..2902c427f 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -2279,11 +2279,13 @@ class IssueTest < ActiveSupport::TestCase end def test_overdue - assert Issue.new(:due_date => 1.day.ago.to_date).overdue? - assert !Issue.new(:due_date => Date.today).overdue? - assert !Issue.new(:due_date => 1.day.from_now.to_date).overdue? + User.current = nil + today = User.current.today + assert Issue.new(:due_date => (today - 1.day).to_date).overdue? + assert !Issue.new(:due_date => today).overdue? + assert !Issue.new(:due_date => (today + 1.day).to_date).overdue? assert !Issue.new(:due_date => nil).overdue? - assert !Issue.new(:due_date => 1.day.ago.to_date, + assert !Issue.new(:due_date => (today - 1.day).to_date, :status => IssueStatus.where(:is_closed => true).first ).overdue? end -- 2.39.5