aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index ecfa13d4ba..ce5c899a19 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -834,6 +834,14 @@ class RouteSetTest < ActiveSupport::TestCase
assert_equal({:controller => 'pages', :action => 'show', :id => '10'}, set.recognize_path('/page/10'))
end
+ def test_route_constraints_on_request_object_with_anchors_are_valid
+ assert_nothing_raised do
+ set.draw do
+ match 'page/:id' => 'pages#show', :constraints => { :host => /^foo$/ }
+ end
+ end
+ end
+
def test_route_constraints_with_anchor_chars_are_invalid
assert_raise ArgumentError do
set.draw do