提交 97a92a4c 编写于 作者: 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>
上级 b5b42af3
......@@ -285,6 +285,11 @@ def test_unknown_zone_with_utc_offset
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册