Add failing test for utf8 redirection when URI.pm < 1.59 with Catalyst-5.9
[catagits/Test-WWW-Mechanize-Catalyst.git] / t / lib / Catty / Controller / Root.pm
index c35798b..77a2825 100644 (file)
@@ -7,6 +7,7 @@ use base qw/ Catalyst::Controller /;
 use Cwd;
 use MIME::Base64;
 use Encode ();
+use utf8;
 
 __PACKAGE__->config( namespace => '' );
 
@@ -143,9 +144,9 @@ sub bad_content_encoding :Global {
     $c->res->body('foo');
 }
 
-sub redirect_to_utf8_upgraded_string {
+sub redirect_to_utf8_upgraded_string : Global {
     my($self, $c) = @_;
-    my $where = $c->uri_for('hello')->stringify;
+    my $where = $c->uri_for('hello', 'müller')->as_string;
     utf8::upgrade($where);
     $c->res->redirect($where);
 }