From: Andy Grundman Date: Thu, 13 Apr 2006 20:59:44 +0000 (+0000) Subject: Failing test for /foo vs /foo/ X-Git-Tag: 5.7099_04~634 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=4065bc1e439e2fe84ab78901cc9dcbff3906686c;hp=f40acefd4fe550234f968f2724cbfe028fca31cd Failing test for /foo vs /foo/ --- diff --git a/t/live_component_controller_action_default.t b/t/live_component_controller_action_default.t index d0922ec..0d88270 100644 --- a/t/live_component_controller_action_default.t +++ b/t/live_component_controller_action_default.t @@ -10,7 +10,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } -use Test::More tests => 12 * $iters; +use Test::More tests => 16 * $iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -69,4 +69,28 @@ sub run_tests { ); is_deeply( $creq->{arguments}, $expected, 'Arguments ok' ); } + + + # Test that /foo and /foo/ both do the same thing + { + my @expected = qw[ + TestApp::Controller::Action->begin + TestApp::Controller::Action->default + TestApp->end + ]; + + my $expected = join( ", ", @expected ); + + ok( my $response = request('http://localhost/action'), 'Request' ); + is( $response->header('X-Catalyst-Executed'), + $expected, + 'Executed actions for /action' + ); + + ok( $response = request('http://localhost/action/'), 'Request' ); + is( $response->header('X-Catalyst-Executed'), + $expected, + 'Executed actions for /action/' + ); + } }