diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 0ac8c24..28c8e2c 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -80,6 +80,11 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest match "/projects/status(.:format)" + constraints(lambda {|req| false }) do + get 'terms' => "terms/special" + end + get 'terms' => "terms/default" + constraints(:ip => /192\.168\.1\.\d\d\d/) do get 'admin' => "queenbee#index" end @@ -1447,6 +1452,13 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_assert_recognizes_with_constraints + with_test_routes do + @routes = Routes + assert_recognizes({:controller => "terms", :action => "default"}, "/terms") + end + end + def test_resource_new_actions with_test_routes do assert_equal '/replies/new/preview', preview_new_reply_path