X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_component_controller_action_chained.t;h=cb4f0dc7979dd994c9cba656afc36867b6536c9d;hb=3b4d12511c59793e85feca1ac1b4a8c2c5f1a6ae;hp=523821d58dcc9e9f8a41e1c6c2d0c619764896a9;hpb=10ae2631516d23f105f7879aabe54a5033ea629a;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_component_controller_action_chained.t b/t/live_component_controller_action_chained.t index 523821d..cb4f0dc 100644 --- a/t/live_component_controller_action_chained.t +++ b/t/live_component_controller_action_chained.t @@ -8,9 +8,9 @@ use lib "$FindBin::Bin/lib"; our $iters; -BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } +BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } -use Test::More tests => 106*$iters; +use Test::More tests => 109*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -729,6 +729,24 @@ sub run_tests { } # + # Test chained actions in the root controller + # + { + my @expected = qw[ + TestApp::Controller::Action::Chained::Root->rootsub + TestApp::Controller::Action::Chained::Root->endpointsub + TestApp->end + ]; + + my $expected = join( ", ", @expected ); + + ok( my $response = request('http://localhost/rootsub/1/endpointsub/2'), 'chained in root namespace' ); + is( $response->header('X-Catalyst-Executed'), + $expected, 'Executed actions' ); + is( $response->content, '', 'Content OK' ); + } + + # # Complex path with multiple empty pathparts # {