diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-04-15 00:25:47 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-14 20:27:24 -0700 |
commit | e79193f852238816a9eeb26fbf1e94b369911718 (patch) | |
tree | 1e369d32b754f0a893619566b030c1d8cefd5b68 /activesupport | |
parent | 8539e4ee730d83096ca540993d7839b41bdc1057 (diff) | |
download | rails-e79193f852238816a9eeb26fbf1e94b369911718.tar.gz rails-e79193f852238816a9eeb26fbf1e94b369911718.tar.bz2 rails-e79193f852238816a9eeb26fbf1e94b369911718.zip |
Test for unknown zone with nil utc_offset
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/time_zone_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |