diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/date_time_test.rb (renamed from activerecord/test/empty_date_time_test.rb) | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/empty_date_time_test.rb b/activerecord/test/date_time_test.rb index 0b50b0949a..340026ecc3 100644 --- a/activerecord/test/empty_date_time_test.rb +++ b/activerecord/test/date_time_test.rb @@ -2,7 +2,13 @@ require 'abstract_unit' require 'fixtures/topic' require 'fixtures/task' -class EmptyDateTimeTest < Test::Unit::TestCase +class DateTimeTest < Test::Unit::TestCase + def test_saves_both_date_and_time + now = 200.years.ago.to_datetime + task = Task.create!(:starting => now) + assert_equal now, Task.find(task.id).starting + end + def test_assign_empty_date_time task = Task.new task.starting = '' |