Permalink
Browse files

Test for unknown zone with nil utc_offset

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 8539e4e commit e79193f852238816a9eeb26fbf1e94b369911718 @spastorino spastorino committed with jeremy Apr 15, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 activesupport/test/time_zone_test.rb
View
5 activesupport/test/time_zone_test.rb
@@ -274,6 +274,11 @@ def test_index
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

0 comments on commit e79193f

Please sign in to comment.