diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-19 22:03:29 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-19 22:59:21 -0700 |
commit | a0dcc95cd80c5546579fdc50294fdfefc289f41b (patch) | |
tree | a40c2e754a51451cd025299c2c16a8195863582d /activesupport/test | |
parent | ff82d7001fb9a4239d9a52d6af4f6d5bb056cc23 (diff) | |
parent | 318ee5413038fc33b302fcb4f41c146c8f10315f (diff) | |
download | rails-a0dcc95cd80c5546579fdc50294fdfefc289f41b.tar.gz rails-a0dcc95cd80c5546579fdc50294fdfefc289f41b.tar.bz2 rails-a0dcc95cd80c5546579fdc50294fdfefc289f41b.zip |
Merge pull request #20625 from Envek/add_country_zones_method
Add ActiveSupport::TimeZone.country_zones helper
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/time_zone_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb index 00d40c4497..d0674eb03a 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -491,6 +491,11 @@ class TimeZoneTest < ActiveSupport::TestCase assert !ActiveSupport::TimeZone.us_zones.include?(ActiveSupport::TimeZone["Kuala Lumpur"]) end + def test_country_zones + assert ActiveSupport::TimeZone.country_zones("ru").include?(ActiveSupport::TimeZone["Moscow"]) + assert !ActiveSupport::TimeZone.country_zones(:ru).include?(ActiveSupport::TimeZone["Kuala Lumpur"]) + end + def test_to_yaml assert_equal("--- !ruby/object:ActiveSupport::TimeZone\nname: Pacific/Honolulu\n", ActiveSupport::TimeZone["Hawaii"].to_yaml) assert_equal("--- !ruby/object:ActiveSupport::TimeZone\nname: Europe/London\n", ActiveSupport::TimeZone["Europe/London"].to_yaml) |