Fix failing test related to missing g in regex
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_uri_for.t
index 170e91b..e70ac55 100644 (file)
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 20;
+use Test::More;
 use URI;
 
 use_ok('Catalyst');
@@ -143,3 +143,13 @@ TODO: {
     is_deeply($query_params_base, $query_params_test,
               "uri_for() doesn't mess up query parameter hash in the caller");
 }
+
+# 5.80018 is only encoding the first of the / in the arg. See line 1271.
+is(
+    Catalyst::uri_for( $context, 'controller/action', 'foo/bar/baz' )->as_string,
+    'http://127.0.0.1/controller/action/foo%2Fbar%2Fbaz',
+    'Escape both forward slashes in the arg as %2F'
+);
+
+done_testing;
+