[Catalyst-commits] r14277 - in Test-WWW-Mechanize-Catalyst/trunk/t: . lib/Catty/Controller

edenc at dev.catalyst.perl.org edenc at dev.catalyst.perl.org
Wed Apr 4 12:22:50 GMT 2012


Author: edenc
Date: 2012-04-04 12:22:50 +0000 (Wed, 04 Apr 2012)
New Revision: 14277

Modified:
   Test-WWW-Mechanize-Catalyst/trunk/t/lib/Catty/Controller/Root.pm
   Test-WWW-Mechanize-Catalyst/trunk/t/redirect.t
Log:
adding utf8 redirection test

Modified: Test-WWW-Mechanize-Catalyst/trunk/t/lib/Catty/Controller/Root.pm
===================================================================
--- Test-WWW-Mechanize-Catalyst/trunk/t/lib/Catty/Controller/Root.pm	2012-03-29 15:21:46 UTC (rev 14276)
+++ Test-WWW-Mechanize-Catalyst/trunk/t/lib/Catty/Controller/Root.pm	2012-04-04 12:22:50 UTC (rev 14277)
@@ -2,7 +2,6 @@
 
 use strict;
 use warnings;
-
 use base qw/ Catalyst::Controller /;
 
 use Cwd;
@@ -144,5 +143,12 @@
     $c->res->body('foo');
 }
 
+sub redirect_to_utf8_upgraded_string {
+    my($self, $c) = @_;
+    my $where = $c->uri_for('hello')->stringify;
+    utf8::upgrade($where);
+    $c->res->redirect($where);
+}
+
 1;
 

Modified: Test-WWW-Mechanize-Catalyst/trunk/t/redirect.t
===================================================================
--- Test-WWW-Mechanize-Catalyst/trunk/t/redirect.t	2012-03-29 15:21:46 UTC (rev 14276)
+++ Test-WWW-Mechanize-Catalyst/trunk/t/redirect.t	2012-04-04 12:22:50 UTC (rev 14277)
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 use lib 'lib';
-use Test::More tests => 28;
+use Test::More tests => 29;
 use lib 't/lib';
 use Test::WWW::Mechanize::Catalyst 'Catty';
 
@@ -33,3 +33,7 @@
 
 $m->get("$root/redirect_with_500");
 is ($m->status, 500, "Redirect not followed on 500");
+
+$m->get_ok( "$root/redirect_to_utf8_upgraded_string",
+            "redirect using an upgraded utf8 string" );
+




More information about the Catalyst-commits mailing list