diff options
author | Leigh Caplan <lcaplan@onehub.com> | 2010-06-28 14:04:11 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-28 19:35:27 +0200 |
commit | 97a92a4cfddf819357ca09b4a91a5937b044e4d8 (patch) | |
tree | 93f0af8f65c73153bbc68b5c1ad5719708a4caf3 /activesupport/test/time_zone_test.rb | |
parent | b5b42af33f446ca3de1d80f92b8c9138dbf6c05d (diff) | |
download | rails-97a92a4cfddf819357ca09b4a91a5937b044e4d8.tar.gz rails-97a92a4cfddf819357ca09b4a91a5937b044e4d8.tar.bz2 rails-97a92a4cfddf819357ca09b4a91a5937b044e4d8.zip |
test that unknown zones don't store mapping keys
[#4942]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport/test/time_zone_test.rb')
-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 620623b389..922449988b 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -285,6 +285,11 @@ class TimeZoneTest < Test::Unit::TestCase assert_equal(-21_600, zone.utc_offset) end + def test_unknown_zones_dont_store_mapping_keys + ActiveSupport::TimeZone["bogus"] + assert !ActiveSupport::TimeZone.zones_map.key?("bogus") + end + def test_new assert_equal ActiveSupport::TimeZone["Central Time (US & Canada)"], ActiveSupport::TimeZone.new("Central Time (US & Canada)") end |