提交 80473e03 编写于 作者: L Leigh Caplan 提交者: José Valim

test that unknown zones don't store mapping keys

[#4942]
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 70af7efa
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册