diff options
author | George Guimarães <george@plataformatec.com.br> | 2013-12-05 21:00:19 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-05 21:32:51 -0200 |
commit | ea75eb6499da78589db6b93daea11994487a2e5c (patch) | |
tree | a42f5a8470e46a1e448f12974174c73962b15419 /activerecord/test/cases | |
parent | dbdbda9a4a5cb9cd22e7a5a5625caa84edae6d5d (diff) | |
download | rails-ea75eb6499da78589db6b93daea11994487a2e5c.tar.gz rails-ea75eb6499da78589db6b93daea11994487a2e5c.tar.bz2 rails-ea75eb6499da78589db6b93daea11994487a2e5c.zip |
Add integration test for #12459
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 9d7f57bf85..df4183c065 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -584,6 +584,14 @@ class DirtyTest < ActiveRecord::TestCase end end + def test_datetime_attribute_doesnt_change_if_zone_is_modified_in_string + time_in_paris = Time.utc(2014, 1, 1, 12, 0, 0).in_time_zone('Paris') + pirate = Pirate.create!(:catchphrase => 'rrrr', :created_on => time_in_paris) + + pirate.created_on = pirate.created_on.in_time_zone('Tokyo').to_s + assert !pirate.created_on_changed? + end + test "partial insert" do with_partial_writes Person do jon = nil |