Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add integration test for #12459

  • Loading branch information...
commit ea75eb6499da78589db6b93daea11994487a2e5c 1 parent dbdbda9
@georgeguimaraes georgeguimaraes authored rafaelfranca committed
Showing with 8 additions and 0 deletions.
  1. +8 −0 activerecord/test/cases/dirty_test.rb
View
8 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
Please sign in to comment.
Something went wrong with that request. Please try again.