@@ -67,6 +67,12 class TimeEntryTest < ActiveSupport::TestCase | |||||
67 | assert_equal Date.parse("2011-01-14"), c.spent_on |
|
67 | assert_equal Date.parse("2011-01-14"), c.spent_on | |
68 | end |
|
68 | end | |
69 |
|
69 | |||
|
70 | def test_spent_on_with_invalid_string | |||
|
71 | c = TimeEntry.new | |||
|
72 | c.spent_on = "foo" | |||
|
73 | assert_nil c.spent_on | |||
|
74 | end | |||
|
75 | ||||
70 | def test_spent_on_with_date |
|
76 | def test_spent_on_with_date | |
71 | c = TimeEntry.new |
|
77 | c = TimeEntry.new | |
72 | c.spent_on = Date.today |
|
78 | c.spent_on = Date.today |
General Comments 0
You need to be logged in to leave comments.
Login now