X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_inheritance.t;fp=t%2Faggregate%2Flive_component_controller_action_inheritance.t;h=4a434e0b3ba962cb479d5c12effacddbfca19762;hb=a127b1987f6a2a69e0128fd51b7e989e7438c313;hp=c58866b50ad6d5292e75eb099bfad6a7dabe7232;hpb=626053191a3ba8c5f4ac8bd831009e962842c469;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_inheritance.t b/t/aggregate/live_component_controller_action_inheritance.t index c58866b..4a434e0 100644 --- a/t/aggregate/live_component_controller_action_inheritance.t +++ b/t/aggregate/live_component_controller_action_inheritance.t @@ -10,7 +10,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } -use Test::More tests => 21*$iters; +use Test::More tests => 26*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -116,4 +116,26 @@ sub run_tests { 'Content is a serialized Catalyst::Request' ); } + + { + my @expected = qw[ + TestApp::Controller::Action::Inheritance->begin + TestApp::Controller::Action::Inheritance->auto + TestApp::Controller::Action::Inheritance::Chained->chain_root + TestApp::Controller::Action::Inheritance::Chained->chain_first + TestApp::Controller::Action::Inheritance::Chained->chain_middle + TestApp::Controller::Action::Inheritance::Chained->chain_end + TestApp::Controller::Action::Inheritance->end + ]; + + my $expected = join( ", ", @expected ); + + ok( my $response = request('http://localhost/action/inheritance/chained/chain_end'), + 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + is( $response->content_type, 'text/plain', 'Response Content-Type' ); + is( $response->header('X-Catalyst-Action'), '/action/inheritance/chained/chain_end', 'Test Action' ); + is( $response->header('X-Catalyst-Executed'), + $expected, 'Executed actions' ); + } }