aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-08-07 22:07:33 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-08-07 22:07:33 +0000
commit52c9ad4c9828504ff7859a9dc7ee33d3bdd532c4 (patch)
tree20b4475565a10b5810948fcdccd0b1c2126ccd3a /activesupport/test
parentc3cdd3b6595ad59129d7652f6f3274f26509a4dc (diff)
downloadrails-52c9ad4c9828504ff7859a9dc7ee33d3bdd532c4.tar.gz
rails-52c9ad4c9828504ff7859a9dc7ee33d3bdd532c4.tar.bz2
rails-52c9ad4c9828504ff7859a9dc7ee33d3bdd532c4.zip
DateTime#to_time gives hour/minute/second resolution. Closes #5747.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/date_ext_test.rb4
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