X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flive_component_controller_action_chained.t;h=b9367a21e8c8469b1d68762455c300d78b6d21fd;hp=dca2385ac8a4815655ed7edbaf7da8c84934709c;hb=b7ce908fc5c404dcbc480c7ecf9a275b92fcc26f;hpb=1c34f703cbd82cddceea95593001a579e1d5f646 diff --git a/t/live_component_controller_action_chained.t b/t/live_component_controller_action_chained.t index dca2385..b9367a2 100644 --- a/t/live_component_controller_action_chained.t +++ b/t/live_component_controller_action_chained.t @@ -10,7 +10,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } -use Test::More tests => 96*$iters; +use Test::More tests => 99*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -364,6 +364,27 @@ sub run_tests { } # + # This belongs to the former test but tests if two chained actions have + # priority over an action with one child action not having the Args() attr set. + # + { + my @expected = qw[ + TestApp::Controller::Action::Chained->begin + TestApp::Controller::Action::Chained->priority_c1 + TestApp::Controller::Action::Chained->priority_c2_xyz + TestApp::Controller::Action::Chained->end + ]; + + my $expected = join( ", ", @expected ); + + ok( my $response = request('http://localhost/chained/priority_c/1/xyz/'), + 'priority - no Args() order mismatch' ); + is( $response->header('X-Catalyst-Executed'), + $expected, 'Executed actions' ); + is( $response->content, '1; ', 'Content OK' ); + } + + # # Test dispatching between two controllers that are on the same level and # therefor have no parent/child relationship. #