Fixed index test to work around HTTP::Response bug
Andy Grundman [Sat, 22 Oct 2005 15:55:12 +0000 (15:55 +0000)]
lib/Catalyst/Engine/Test.pm
t/live/component/controller/action/index.t
t/live/lib/TestApp/Controller/Action/Index.pm

index 8173bde..452cc2d 100644 (file)
@@ -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,
index a18871b..6e44b21 100644 (file)
@@ -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
index d6b2ada..ef3dd1a 100644 (file)
@@ -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;