Fix to allow uri_for and uri_with to stringify non-array references
[catagits/Catalyst-Runtime.git] / t / live_engine_request_uri.t
index dba622f..9b5833e 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use FindBin;\r
 use lib "$FindBin::Bin/lib";\r
 \r
-use Test::More tests => 38;\r
+use Test::More tests => 41;\r
 use Catalyst::Test 'TestApp';\r
 use Catalyst::Request;\r
 \r
@@ -84,6 +84,13 @@ my $creq;
     is( $response->header( 'X-Catalyst-Param-b' ), '1', 'param "b" ok' );\r
 }\r
 \r
+# test that uri_with replaces params (and preserves)\r
+{\r
+    ok( my $response = request('http://localhost/engine/request/uri/uri_with_object'), 'Request' );\r
+    ok( $response->is_success, 'Response Successful 2xx' );\r
+    is( $response->header( 'X-Catalyst-Param-a' ), 'http://localhost/', 'param "a" ok' );\r
+}\r
+\r
 # test that uri_with is utf8 safe\r
 {\r
     ok( my $response = request("http://localhost/engine/request/uri/uri_with_utf8"), 'Request' );\r