Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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>
  • Loading branch information...
commit 80473e035a166d270a204aedaf01c2b80415b8e4 1 parent 70af7ef
@texel texel authored josevalim committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 activesupport/test/time_zone_test.rb
View
5 activesupport/test/time_zone_test.rb
@@ -261,6 +261,11 @@ def test_index
assert_raise(ArgumentError) { ActiveSupport::TimeZone[false] }
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
Please sign in to comment.
Something went wrong with that request. Please try again.