From 866cba7bb73dcd9d9ae60e8163655295d825dc58 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 9 Mar 2007 00:34:17 +0000 Subject: DateTimes assume the default timezone. Closes #7764. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/migration_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb index 3b0e310386..f5b13f6c99 100644 --- a/activerecord/test/migration_test.rb +++ b/activerecord/test/migration_test.rb @@ -302,7 +302,12 @@ if ActiveRecord::Base.connection.supports_migrations? assert_equal Date, bob.favorite_day.class end + # Test DateTime column and defaults, including timezone. assert_equal DateTime, bob.moment_of_truth.class + assert_equal DateTime.now.offset, bob.moment_of_truth.offset + assert_not_equal 0, bob.moment_of_truth.offset + assert_not_equal "Z", bob.moment_of_truth.zone + assert_equal TrueClass, bob.male?.class assert_kind_of BigDecimal, bob.wealth end -- cgit v1.2.3