Fixed path, can now be changed properly, also updated test for this
Andy Grundman [Tue, 11 Oct 2005 22:12:58 +0000 (22:12 +0000)]
lib/Catalyst/Request.pm
t/live/engine/request/uri.t

index ace44c7..b38b693 100644 (file)
@@ -331,9 +331,6 @@ sub path {
     my ( $self, $params ) = @_;
 
     if ($params) {
-
-        # base must always have a trailing slash
-        $params .= '/' unless ( $params =~ /\/$/ );
         $self->uri->path($params);
     }
 
index a6c6b38..8d91502 100644 (file)
@@ -17,7 +17,7 @@ my $creq;
     ok( my $response = request('http://localhost/engine/request/uri/change_path'), 'Request' );\r
     ok( $response->is_success, 'Response Successful 2xx' );\r
     ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' );\r
-    like( $creq->uri, qr{/my/app/lives/here}, 'URI contains new path' );\r
+    like( $creq->uri, qr{/my/app/lives/here$}, 'URI contains new path' );\r
 }\r
 \r
 # test that path properly removes the base location\r