diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/date_ext_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb index 71c2ed1f3a..56161954a0 100644 --- a/activesupport/test/core_ext/date_ext_test.rb +++ b/activesupport/test/core_ext/date_ext_test.rb @@ -10,6 +10,10 @@ class DateExtCalculationsTest < Test::Unit::TestCase assert_equal Time.local(2005, 2, 21), Date.new(2005, 2, 21).to_time end + def test_to_time_on_datetime + assert_equal Time.local(2005, 2, 21, 10, 11, 12), DateTime.new(2005, 2, 21, 10, 11, 12).to_time + end + def test_to_date assert_equal Date.new(2005, 2, 21), Date.new(2005, 2, 21).to_date end |