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>
This commit is contained in:
parent
b5b42af33f
commit
97a92a4cfd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user