test/tc_timezone_proxy.rb in tzinfo-1.2.4 vs test/tc_timezone_proxy.rb in tzinfo-1.2.5

- old
+ new

@@ -86,9 +86,18 @@ assert_equal('UTC', proxy.canonical_identifier) assert_same(Timezone.get('UTC'), proxy.canonical_zone) end end + + def test_after_freeze + proxy = TimezoneProxy.new('Europe/London') + real = Timezone.get('Europe/London') + t = Time.utc(2017, 6, 1) + proxy.freeze + assert_equal('Europe/London', proxy.identifier) + assert_equal(real.utc_to_local(t), proxy.utc_to_local(t)) + end def test_equals assert_equal(true, TimezoneProxy.new('Europe/London') == TimezoneProxy.new('Europe/London')) assert_equal(false, TimezoneProxy.new('Europe/London') == TimezoneProxy.new('Europe/Paris')) assert(!(TimezoneProxy.new('Europe/London') == Object.new))