From e79193f852238816a9eeb26fbf1e94b369911718 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 15 Apr 2010 00:25:47 -0300 Subject: Test for unknown zone with nil utc_offset Signed-off-by: Jeremy Kemper --- activesupport/test/time_zone_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport') diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb index 68027f7c94..61c59060f3 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -274,6 +274,11 @@ class TimeZoneTest < Test::Unit::TestCase assert_raise(ArgumentError) { ActiveSupport::TimeZone[false] } end + def test_unknown_zone_shouldnt_have_tzinfo + zone = ActiveSupport::TimeZone.create("bogus") + assert_nil zone.tzinfo + end + def test_new assert_equal ActiveSupport::TimeZone["Central Time (US & Canada)"], ActiveSupport::TimeZone.new("Central Time (US & Canada)") end -- cgit v1.2.3