diff options
author | brainopia <brainopia@evilmartians.com> | 2015-01-03 02:03:47 +0300 |
---|---|---|
committer | brainopia <brainopia@evilmartians.com> | 2015-01-03 02:03:47 +0300 |
commit | e8d6ba218ac019591f1d68f4f54d4243b606893c (patch) | |
tree | d46763f1864c43a1ea3cebccfc09204b19dd774c /activerecord/test/cases | |
parent | 78dab2a8569408658542e462a957ea5a35aa4679 (diff) | |
download | rails-e8d6ba218ac019591f1d68f4f54d4243b606893c.tar.gz rails-e8d6ba218ac019591f1d68f4f54d4243b606893c.tar.bz2 rails-e8d6ba218ac019591f1d68f4f54d4243b606893c.zip |
Support datetime values in AR::Type::DateTime#type_cast_for_database
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/date_time_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/date_time_test.rb b/activerecord/test/cases/date_time_test.rb index c2ec92c40d..330232cee2 100644 --- a/activerecord/test/cases/date_time_test.rb +++ b/activerecord/test/cases/date_time_test.rb @@ -50,4 +50,12 @@ class DateTimeTest < ActiveRecord::TestCase topic.bonus_time = '' assert_nil topic.bonus_time end + + def test_assign_in_local_timezone + now = DateTime.now + with_timezone_config default: :local do + task = Task.new starting: now + assert now, task.starting + end + end end |