aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-06-07 14:57:04 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-06-07 14:57:04 -0300
commitdc73e39b4d40f0965b000f84568f77f126ec8290 (patch)
treed9eaacbaea2185f3b3795deeb9a76de868c4d435 /activerecord/test
parentc6e166b25e60a6594ab9aeba1738a835aa744d3e (diff)
parent3b22df2350dd671436ca5b1e4de4af3df9a8cca2 (diff)
downloadrails-dc73e39b4d40f0965b000f84568f77f126ec8290.tar.gz
rails-dc73e39b4d40f0965b000f84568f77f126ec8290.tar.bz2
rails-dc73e39b4d40f0965b000f84568f77f126ec8290.zip
Merge pull request #15561 from sgrif/sg-time-zone-aware-arrays
Ensure time zones don't change after round trip with array columns
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/postgresql/array_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/array_test.rb b/activerecord/test/cases/adapters/postgresql/array_test.rb
index c78c502478..1d431f1666 100644
--- a/activerecord/test/cases/adapters/postgresql/array_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/array_test.rb
@@ -208,11 +208,13 @@ class PostgresqlArrayTest < ActiveRecord::TestCase
record = PgArray.new(datetimes: [time_string])
assert_equal [time], record.datetimes
+ assert_equal ActiveSupport::TimeZone[tz], record.datetimes.first.time_zone
record.save!
record.reload
assert_equal [time], record.datetimes
+ assert_equal ActiveSupport::TimeZone[tz], record.datetimes.first.time_zone
end
end