X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_chained.t;h=f0cbc6a74c16edecd69c8a55341c2465e52c8ced;hb=e43b00f9e441be1aed9a49532b419a6f6c7782fb;hp=99ea3c76f51328a234b172543d0d67fb94ff153f;hpb=9af4ee013b23e7241d4664ea39952fa3b20f4b7f;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_chained.t b/t/aggregate/live_component_controller_action_chained.t index 99ea3c7..f0cbc6a 100644 --- a/t/aggregate/live_component_controller_action_chained.t +++ b/t/aggregate/live_component_controller_action_chained.t @@ -776,6 +776,25 @@ sub run_tests { { my @expected = qw[ TestApp::Controller::Action::Chained->begin + TestApp::Controller::Action::Chained->chain_error_a + TestApp::Controller::Action::Chained->end + ]; + + my $expected = join( ", ", @expected ); + + ok( my $response = request('http://localhost/chained/chain_error/1/end/2'), + "Break a chain in the middle" ); + is( $response->header('X-Catalyst-Executed'), + $expected, 'Executed actions' ); + is( $response->content, 'FATAL ERROR: break in the middle of a chain', 'Content OK' ); + } + + # + # Test dieing in the middle of a chain. + # + { + my @expected = qw[ + TestApp::Controller::Action::Chained->begin TestApp::Controller::Action::Chained->chain_die_a TestApp::Controller::Action::Chained->end ]; @@ -786,7 +805,7 @@ sub run_tests { "Break a chain in the middle" ); is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' ); - is( $response->content, 'FATAL ERROR: break in the middle of a chain', 'Content OK' ); + is( $response->content, 'FATAL ERROR: Caught exception in TestApp::Controller::Action::Chained->chain_die_a "die in the middle of a chain"', 'Content OK' ); } #