5 class DateTimeTest
< ActiveRecord
::TestCase
6 def test_saves_both_date_and_time
7 time_values
= [1807, 2, 10, 15, 30, 45]
8 now
= DateTime
.civil(*time_values
)
14 # check against Time.local_time, since some platforms will return a Time instead of a DateTime
15 assert_equal Time
.local_time(*time_values
), Task
.find(task
.id
).starting
18 def test_assign_empty_date_time
22 assert_nil task
.starting
23 assert_nil task
.ending
26 def test_assign_empty_date
29 assert_nil topic
.last_read
32 def test_assign_empty_time
35 assert_nil topic
.bonus_time