summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/unit/time_entry_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/time_entry_test.rb b/test/unit/time_entry_test.rb
index 70774567e..bd49494c6 100644
--- a/test/unit/time_entry_test.rb
+++ b/test/unit/time_entry_test.rb
@@ -67,6 +67,12 @@ class TimeEntryTest < ActiveSupport::TestCase
assert_equal Date.parse("2011-01-14"), c.spent_on
end
+ def test_spent_on_with_invalid_string
+ c = TimeEntry.new
+ c.spent_on = "foo"
+ assert_nil c.spent_on
+ end
+
def test_spent_on_with_date
c = TimeEntry.new
c.spent_on = Date.today