added $c->req->uri_with helper + tests
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Engine / Request / URI.pm
index cb86f30..cf0c408 100644 (file)
@@ -28,4 +28,17 @@ sub change_base : Local {
     $c->forward('TestApp::View::Dump::Request');\r
 }\r
 \r
+sub uri_with : Local {\r
+    my ( $self, $c ) = @_;\r
+\r
+    # change the current uri\r
+    my $uri   = $c->req->uri_with( { b => 1 } );\r
+    my %query = $uri->query_form;\r
+    \r
+    $c->res->header( 'X-Catalyst-Param-a' => $query{ a } );\r
+    $c->res->header( 'X-Catalyst-Param-b' => $query{ b } );\r
+    \r
+    $c->forward('TestApp::View::Dump::Request');\r
+}\r
+\r
 1;\r