aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/time_zone_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/time_zone_test.rb')
-rw-r--r--activesupport/test/time_zone_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index 3cdf5582bf..080ccef8ac 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -80,12 +80,19 @@ class TimeZoneTest < Test::Unit::TestCase
def test_index
assert_nil TimeZone["bogus"]
assert_not_nil TimeZone["Central Time (US & Canada)"]
+ assert_not_nil TimeZone[8]
+ assert_raises(ArgumentError) { TimeZone[false] }
end
-
+
def test_new
a = TimeZone.new("Berlin")
b = TimeZone.new("Berlin")
assert_same a, b
assert_nil TimeZone.new("bogus")
end
+
+ def test_us_zones
+ assert TimeZone.us_zones.include?(TimeZone["Hawaii"])
+ assert !TimeZone.us_zones.include?(TimeZone["Kuala Lumpur"])
+ end
end