X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_index.t;h=48c6ec7dab8b7b759237c6ca1141d3f8251a461e;hb=6e3dd95f237370a2824e5ecc1419eaed075f0279;hp=99e9435a3024c92e0c3b5612dc5dd39afd1bde38;hpb=42da66a91b0a87ebb81d8552bcd0b05d3557c83e;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_index.t b/t/aggregate/live_component_controller_action_index.t index 99e9435..48c6ec7 100644 --- a/t/aggregate/live_component_controller_action_index.t +++ b/t/aggregate/live_component_controller_action_index.t @@ -1,5 +1,3 @@ -#!perl - use strict; use warnings; @@ -27,71 +25,71 @@ sub run_tests { # test root index { my @expected = qw[ - TestApp->index - TestApp->end + TestApp::Controller::Root->index + TestApp::Controller::Root->end ]; - + my $expected = join( ", ", @expected ); ok( my $response = request('http://localhost/'), 'root index' ); is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' ); is( $response->content, 'root index', 'root index ok' ); - + ok( $response = request('http://localhost'), 'root index no slash' ); is( $response->content, 'root index', 'root index no slash ok' ); } - + # test first-level controller index { my @expected = qw[ TestApp::Controller::Index->index - TestApp->end + TestApp::Controller::Root->end ]; - + my $expected = join( ", ", @expected ); - + ok( my $response = request('http://localhost/index/'), 'first-level controller index' ); is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' ); is( $response->content, 'Index index', 'first-level controller index ok' ); - + ok( $response = request('http://localhost/index'), 'first-level controller index no slash' ); is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' ); - is( $response->content, 'Index index', 'first-level controller index no slash ok' ); - } - + is( $response->content, 'Index index', 'first-level controller index no slash ok' ); + } + # test second-level controller index { my @expected = qw[ TestApp::Controller::Action::Index->begin TestApp::Controller::Action::Index->index - TestApp->end + TestApp::Controller::Root->end ]; - + my $expected = join( ", ", @expected ); - + ok( my $response = request('http://localhost/action/index/'), 'second-level controller index' ); is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' ); is( $response->content, 'Action-Index index', 'second-level controller index ok' ); - + ok( $response = request('http://localhost/action/index'), 'second-level controller index no slash' ); is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' ); - is( $response->content, 'Action-Index index', 'second-level controller index no slash ok' ); + is( $response->content, 'Action-Index index', 'second-level controller index no slash ok' ); } - + # test controller default when index is present { my @expected = qw[ TestApp::Controller::Action::Index->begin TestApp::Controller::Action::Index->default - TestApp->end + TestApp::Controller::Root->end ]; - + my $expected = join( ", ", @expected ); - + ok( my $response = request('http://localhost/action/index/foo'), 'default with index' ); is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' );