diff options
author | Chris LaRose <cjlarose@gmail.com> | 2017-11-22 09:12:08 -0800 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2017-11-22 17:12:08 +0000 |
commit | 078421bacba178eac6a8e607b16f3f4511c5d72f (patch) | |
tree | c8732cbdc32fd66191fa89ebab7ef9721aca0499 /activesupport/test | |
parent | 858baa099b26f6b3e9eb8376d9c09559fe5cc599 (diff) | |
download | rails-078421bacba178eac6a8e607b16f3f4511c5d72f.tar.gz rails-078421bacba178eac6a8e607b16f3f4511c5d72f.tar.bz2 rails-078421bacba178eac6a8e607b16f3f4511c5d72f.zip |
Make ActiveSupport::TimeZone.all independent of previous lookups (#31176)
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/time_zone_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb index 862e872494..405c8f315b 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -718,6 +718,13 @@ class TimeZoneTest < ActiveSupport::TestCase end end + def test_all_uninfluenced_by_time_zone_lookups_delegated_to_tzinfo + ActiveSupport::TimeZone.clear + galapagos = ActiveSupport::TimeZone["Pacific/Galapagos"] + all_zones = ActiveSupport::TimeZone.all + assert_not_includes all_zones, galapagos + end + def test_index assert_nil ActiveSupport::TimeZone["bogus"] assert_instance_of ActiveSupport::TimeZone, ActiveSupport::TimeZone["Central Time (US & Canada)"] |