diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-07-31 06:57:35 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-07-31 06:57:35 +0000 |
commit | eb1998ef39af16d4ec2c4018a0837580e6b85559 (patch) | |
tree | fbe75dbce5220f010170b1fd9a220786c43dfeaa /test/unit/issue_test.rb | |
parent | 63217014ffd7f952629d849a9d9cf23162562d2b (diff) | |
download | redmine-eb1998ef39af16d4ec2c4018a0837580e6b85559.tar.gz redmine-eb1998ef39af16d4ec2c4018a0837580e6b85559.zip |
try IssueTest#test_overdue failing on CI server at Japanese daytime (#22320)
git-svn-id: http://svn.redmine.org/redmine/trunk@16938 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_test.rb')
-rw-r--r-- | test/unit/issue_test.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 83b47898a..861e3f668 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -2296,11 +2296,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 |