fix undef values in params sent to uri_with() and uri_for()
[catagits/Catalyst-Runtime.git] / t / live_engine_request_uri.t
index 5027b9c..943b276 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use FindBin;\r
 use lib "$FindBin::Bin/lib";\r
 \r
-use Test::More tests => 41;\r
+use Test::More tests => 44;\r
 use Catalyst::Test 'TestApp';\r
 use Catalyst::Request;\r
 \r
@@ -97,3 +97,10 @@ my $creq;
     ok( $response->is_success, 'Response Successful 2xx' );\r
     like( $response->header( 'X-Catalyst-uri-with' ), qr/%E2%98%A0$/, 'uri_with ok' );\r
 }\r
+
+# test with undef -- no warnings should be thrown\r
+{\r
+    ok( my $response = request("http://localhost/engine/request/uri/uri_with_undef"), 'Request' );\r
+    ok( $response->is_success, 'Response Successful 2xx' );\r
+    is( $response->header( 'X-Catalyst-warnings' ), 0, 'no warnings emitted' );\r
+}\r