X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_index.t;h=fbaeaaba532b1be9c7ebfb2c5dc6b4bc113a0938;hp=7cd24a9c2bec1f5bf6ed00ba64117e914a3c60c7;hb=b376e4ecc15edbb0abeb1276710e8da7826daa82;hpb=fb99321f925e4516003c21c502d363adbcb6df9e diff --git a/t/aggregate/live_component_controller_action_index.t b/t/aggregate/live_component_controller_action_index.t index 7cd24a9..fbaeaab 100644 --- a/t/aggregate/live_component_controller_action_index.t +++ b/t/aggregate/live_component_controller_action_index.t @@ -30,37 +30,37 @@ sub run_tests { 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::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[ @@ -68,20 +68,20 @@ sub run_tests { TestApp::Controller::Action::Index->index 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[ @@ -89,9 +89,9 @@ sub run_tests { TestApp::Controller::Action::Index->default 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' );