From: Andy Grundman Date: Sat, 22 Oct 2005 15:55:12 +0000 (+0000) Subject: Fixed index test to work around HTTP::Response bug X-Git-Tag: 5.7099_04~1125 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=506b5a8047a87dbb6b73150467987304c358f85d Fixed index test to work around HTTP::Response bug --- diff --git a/lib/Catalyst/Engine/Test.pm b/lib/Catalyst/Engine/Test.pm index 8173bde..452cc2d 100644 --- a/lib/Catalyst/Engine/Test.pm +++ b/lib/Catalyst/Engine/Test.pm @@ -66,10 +66,10 @@ sub run { # We emulate CGI local %ENV = ( - PATH_INFO => $request->uri->path || '', - QUERY_STRING => $request->uri->query || '', - REMOTE_ADDR => '127.0.0.1', - REMOTE_HOST => 'localhost', + PATH_INFO => $request->uri->path || '', + QUERY_STRING => $request->uri->query || '', + REMOTE_ADDR => '127.0.0.1', + REMOTE_HOST => 'localhost', REQUEST_METHOD => $request->method, SERVER_NAME => 'localhost', SERVER_PORT => $request->uri->port, diff --git a/t/live/component/controller/action/index.t b/t/live/component/controller/action/index.t index a18871b..6e44b21 100644 --- a/t/live/component/controller/action/index.t +++ b/t/live/component/controller/action/index.t @@ -50,12 +50,12 @@ for ( 1 .. 1 ) { 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' ); + 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 diff --git a/t/live/lib/TestApp/Controller/Action/Index.pm b/t/live/lib/TestApp/Controller/Action/Index.pm index d6b2ada..ef3dd1a 100644 --- a/t/live/lib/TestApp/Controller/Action/Index.pm +++ b/t/live/lib/TestApp/Controller/Action/Index.pm @@ -5,7 +5,7 @@ use base 'TestApp::Controller::Action'; sub index : Private { my ( $self, $c ) = @_; - $c->res->body( 'Action::Index index' ); + $c->res->body( 'Action-Index index' ); } 1;