X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Findex.t;h=2233134326d13a6097e67c2749fe69c4c14771e9;hb=a065abcffc83c51768702707ead07e876ba237a8;hp=738e4224bc5e6febbb1493c9d827b24b33dedbfd;hpb=e0e47c71fdefb2f22ce618560c6546bade22ea53;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live/component/controller/action/index.t b/t/live/component/controller/action/index.t index 738e422..2233134 100644 --- a/t/live/component/controller/action/index.t +++ b/t/live/component/controller/action/index.t @@ -6,7 +6,7 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../../../lib"; -use Test::More tests => 10; +use Test::More tests => 14; use Catalyst::Test 'TestApp'; for ( 1 .. 1 ) { @@ -19,13 +19,22 @@ for ( 1 .. 1 ) { is( $response->content, 'root index', 'root index no slash ok' ); } - # test controller index + # test first-level controller index { - ok( my $response = request('http://localhost/action/index/'), 'controller index' ); - is( $response->content, 'Action::Index index', 'controller index ok' ); + ok( my $response = request('http://localhost/index/'), 'first-level controller index' ); + is( $response->content, 'Index index', 'first-level controller index ok' ); - ok( $response = request('http://localhost/action/index'), 'controller index no slash' ); - is( $response->content, 'Action::Index index', 'controller index no slash ok' ); + ok( $response = request('http://localhost/index'), 'first-level controller index no slash' ); + is( $response->content, 'Index index', 'first-level controller index no slash ok' ); + } + + # test second-level controller index + { + ok( my $response = request('http://localhost/action/index/'), 'second-level controller index' ); + 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->content, 'Action::Index index', 'second-level controller index no slash ok' ); } # test controller default when index is present