Request /c1/bar, not c1/bar
Dave Rolsky [Sun, 23 Jan 2011 17:22:13 +0000 (11:22 -0600)]
t/routes.t

index 7218484..fc2557b 100644 (file)
@@ -45,39 +45,39 @@ use HTTP::Request::Common qw( GET PUT POST DELETE );
 }
 
 {
-    request( GET 'c1/bar', ( Accept => 'application/json' ) );
+    request( GET '/c1/bar', ( Accept => 'application/json' ) );
 
     is(
         $MyApp1::Controller::C1::REQ{get}, 2,
-        'GET request for c1/bar went to the right sub'
+        'GET request for /c1/bar went to the right sub'
     );
 
-    request( GET 'c1/bar', ( Accept => '*/*', ) );
+    request( GET '/c1/bar', ( Accept => '*/*', ) );
 
     is(
         $MyApp1::Controller::C1::REQ{get_html}, 2,
-        'GET request for c1/bar that looks like a browser went to the right sub'
+        'GET request for /c1/bar that looks like a browser went to the right sub'
     );
 
-    request( POST 'c1/bar' );
+    request( POST '/c1/bar' );
 
     is(
         $MyApp1::Controller::C1::REQ{post}, 2,
-        'POST request for c1/bar went to the right sub'
+        'POST request for /c1/bar went to the right sub'
     );
 
-    request( PUT 'c1/bar' );
+    request( PUT '/c1/bar' );
 
     is(
         $MyApp1::Controller::C1::REQ{put}, 2,
-        'PUT request for c1/bar went to the right sub'
+        'PUT request for /c1/bar went to the right sub'
     );
 
-    request( DELETE 'c1/bar' );
+    request( DELETE '/c1/bar' );
 
     is(
         $MyApp1::Controller::C1::REQ{delete}, 2,
-        'DELETE request for c1/bar went to the right sub'
+        'DELETE request for /c1/bar went to the right sub'
     );
 }