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.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index f948c363df..6ca3afd561 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -717,6 +717,13 @@ class TimeZoneTest < ActiveSupport::TestCase
assert zone !~ /Nonexistent_Place/
end
+ def test_zone_match?
+ zone = ActiveSupport::TimeZone["Eastern Time (US & Canada)"]
+ assert zone.match?(/Eastern/)
+ assert zone.match?(/New_York/)
+ assert_not zone.match?(/Nonexistent_Place/)
+ end
+
def test_to_s
assert_equal "(GMT+05:30) New Delhi", ActiveSupport::TimeZone["New Delhi"].to_s
end