Permalink
Browse files

Add integration test for #12459

  • Loading branch information...
1 parent 9e82331 commit 2b3a41fce566408a3f1b32dcbf6c17b9f9786fdf @georgeguimaraes georgeguimaraes committed Dec 5, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 activerecord/test/cases/dirty_test.rb
@@ -584,6 +584,14 @@ def test_datetime_attribute_can_be_updated_with_fractional_seconds
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

0 comments on commit 2b3a41f

Please sign in to comment.