diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index cf92b039e3..0548456b63 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -330,6 +330,10 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest resources :content + scope :constraints => { :id => /\d+/ } do + get '/tickets', :to => 'tickets#index', :as => :tickets + end + match '/:locale/*file.:format', :to => 'files#show', :file => /path\/to\/existing\/file/ end end @@ -1546,6 +1550,14 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_router_removes_invalid_conditions + with_test_routes do + get '/tickets' + assert_equal 'tickets#index', @response.body + assert_equal '/tickets', tickets_path + end + end + private def with_test_routes yield |