]> source.dussan.org Git - redmine.git/commitdiff
Fixed a failing test caused by comparing a Time object (n.day.ago) with a Date object
authorEric Davis <edavis@littlestreamsoftware.com>
Thu, 18 Dec 2008 07:10:23 +0000 (07:10 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Thu, 18 Dec 2008 07:10:23 +0000 (07:10 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2141 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/issue_test.rb

index fee6f78c655168aedc19ab6337b96790c5ec6e62..6615cac0c03c19f7f1715985b8054123d219334b 100644 (file)
@@ -192,9 +192,9 @@ class IssueTest < Test::Unit::TestCase
   end
   
   def test_overdue
-    assert Issue.new(:due_date => 1.day.ago).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).overdue?
+    assert !Issue.new(:due_date => 1.day.from_now.to_date).overdue?
     assert !Issue.new(:due_date => nil).overdue?
   end
 end