From: Andy Grundman Date: Sat, 22 Oct 2005 14:18:40 +0000 (+0000) Subject: Moved first-level index to a new controller so inheritence doesn't break X-Git-Tag: 5.7099_04~1128 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a065abcffc83c51768702707ead07e876ba237a8 Moved first-level index to a new controller so inheritence doesn't break --- diff --git a/t/live/component/controller/action/index.t b/t/live/component/controller/action/index.t index 35c397a..2233134 100644 --- a/t/live/component/controller/action/index.t +++ b/t/live/component/controller/action/index.t @@ -21,11 +21,11 @@ for ( 1 .. 1 ) { # test first-level controller index { - ok( my $response = request('http://localhost/action/'), 'first-level controller index' ); - is( $response->content, 'Action index', 'first-level 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'), 'first-level controller index no slash' ); - is( $response->content, 'Action index', 'first-level 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 diff --git a/t/live/lib/TestApp/Controller/Action.pm b/t/live/lib/TestApp/Controller/Action.pm index 3352415..acd8385 100644 --- a/t/live/lib/TestApp/Controller/Action.pm +++ b/t/live/lib/TestApp/Controller/Action.pm @@ -9,11 +9,6 @@ sub begin : Private { $c->response->content_type('text/plain; charset=utf-8'); } -sub index : Private { - my ( $self, $c ) = @_; - $c->res->body( 'Action index' ); -} - sub default : Private { my ( $self, $c ) = @_; $c->res->output("Error - TestApp::Controller::Action\n"); diff --git a/t/live/lib/TestApp/Controller/Index.pm b/t/live/lib/TestApp/Controller/Index.pm new file mode 100644 index 0000000..9b655d2 --- /dev/null +++ b/t/live/lib/TestApp/Controller/Index.pm @@ -0,0 +1,11 @@ +package TestApp::Controller::Index; + +use strict; +use base 'Catalyst::Base'; + +sub index : Private { + my ( $self, $c ) = @_; + $c->res->body( 'Index index' ); +} + +1;