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:
parent
dbdbda9a4a
commit
ea75eb6499
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue