1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add integration test for #12459

This commit is contained in:
George Guimarães 2013-12-05 21:00:19 -02:00 committed by Rafael Mendonça França
parent dbdbda9a4a
commit ea75eb6499

View file

@ -584,6 +584,14 @@ class DirtyTest < ActiveRecord::TestCase
end end
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 test "partial insert" do
with_partial_writes Person do with_partial_writes Person do
jon = nil jon = nil