From 5f64bce10f2d4b7819e97586cbe3ab225e9e43e8 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 25 Jun 2010 14:38:17 +0100 Subject: Failing test for whether glob parameters accept regexps [#4970 state:committed] Signed-off-by: Jeremy Kemper --- actionpack/test/dispatch/routing_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test/dispatch/routing_test.rb') diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 915c51a020..68e3dd6de3 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -317,6 +317,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest post :preview end end + + match '/:locale/*file.:format', :to => 'files#show', :file => /path\/to\/existing\/file/ end end @@ -1448,6 +1450,13 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_glob_parameter_accepts_regexp + with_test_routes do + get '/en/path/to/existing/file.html' + assert_equal 200, @response.status + end + end + private def with_test_routes yield -- cgit v1.2.3