X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_regexp.t;h=fd65665da17e5a949e3cd4005d957907a921c198;hb=94d7a76e1f113e306327a86cbdbcae2afd428f0a;hp=ab5d4baec11b5c2a7d0ffe46a6fa6760f2baa6f4;hpb=42da66a91b0a87ebb81d8552bcd0b05d3557c83e;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_regexp.t b/t/aggregate/live_component_controller_action_regexp.t index ab5d4ba..fd65665 100644 --- a/t/aggregate/live_component_controller_action_regexp.t +++ b/t/aggregate/live_component_controller_action_regexp.t @@ -10,7 +10,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } -use Test::More tests => 33*$iters; +use Test::More tests => 38*$iters; use Catalyst::Test 'TestApp'; use Catalyst::Request; @@ -118,4 +118,24 @@ sub run_tests { 'Test Class' ); } + + { + my $url = 'http://localhost/action/regexp/redirect/life/universe/42/everything'; + ok( my $response = request($url), + 'Request' ); + ok( $response->is_redirect, 'Response is redirect' ); + is( $response->header('X-Catalyst-Action'), + '^action/regexp/redirect/(\w+)/universe/(\d+)/everything$', 'Test Action' ); + is( + $response->header('X-Test-Class'), + 'TestApp::Controller::Action::Regexp', + 'Test Class' + ); + is( + $response->header('location'), + $response->request->uri, + 'Redirect URI is the same as the request URI' + ); + } } +