Remove use of Catalyst::Base from the tests
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Engine / Request / URI.pm
index b41c66a..2acfd67 100644 (file)
@@ -1,7 +1,7 @@
 package TestApp::Controller::Engine::Request::URI;
 
 use strict;
-use base 'Catalyst::Base';
+use base 'Catalyst::Controller';
 
 sub default : Private {
     my ( $self, $c ) = @_;
@@ -77,4 +77,26 @@ sub uri_with_undef : Local {
     $c->forward('TestApp::View::Dump::Request');
 }
 
+sub uri_with_undef_only : Local {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri_with( { a => undef } );
+    
+    $c->res->header( 'X-Catalyst-uri-with' => "$uri" );
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub uri_with_undef_ignore : Local {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri_with( { a => 1, b => undef } );
+    
+    my %query = $uri->query_form;
+    $c->res->header( 'X-Catalyst-uri-with' => "$uri" );
+    $c->res->header( 'X-Catalyst-Param-a' => $query{ a } );
+    $c->res->header( 'X-Catalyst-Param-b' => $query{ b } );
+    $c->res->header( 'X-Catalyst-Param-c' => $query{ c } );
+    $c->forward('TestApp::View::Dump::Request');
+}
+
 1;