[Catalyst-commits] r14134 - in Test-WWW-Mechanize-Catalyst/trunk/t:
. lib/Catty/Controller
edenc at dev.catalyst.perl.org
edenc at dev.catalyst.perl.org
Sat Oct 15 16:45:59 GMT 2011
Author: edenc
Date: 2011-10-15 16:45:59 +0000 (Sat, 15 Oct 2011)
New Revision: 14134
Added:
Test-WWW-Mechanize-Catalyst/trunk/t/decoded_content.t
Modified:
Test-WWW-Mechanize-Catalyst/trunk/t/lib/Catty/Controller/Root.pm
Log:
added test to address rt #36442
Added: Test-WWW-Mechanize-Catalyst/trunk/t/decoded_content.t
===================================================================
--- Test-WWW-Mechanize-Catalyst/trunk/t/decoded_content.t (rev 0)
+++ Test-WWW-Mechanize-Catalyst/trunk/t/decoded_content.t 2011-10-15 16:45:59 UTC (rev 14134)
@@ -0,0 +1,15 @@
+#!perl
+use strict;
+use warnings;
+use lib 'lib';
+use Test::More tests => 2;
+use lib 't/lib';
+use Test::WWW::Mechanize::Catalyst 'Catty';
+
+my $root = "http://localhost";
+
+my $m = Test::WWW::Mechanize::Catalyst->new;
+$m->get_ok("$root/bad_content_encoding/");
+
+# per https://rt.cpan.org/Ticket/Display.html?id=36442
+$m->content_contains('foo');
Modified: Test-WWW-Mechanize-Catalyst/trunk/t/lib/Catty/Controller/Root.pm
===================================================================
--- Test-WWW-Mechanize-Catalyst/trunk/t/lib/Catty/Controller/Root.pm 2011-10-14 11:59:32 UTC (rev 14133)
+++ Test-WWW-Mechanize-Catalyst/trunk/t/lib/Catty/Controller/Root.pm 2011-10-15 16:45:59 UTC (rev 14134)
@@ -137,5 +137,12 @@
}
+# per https://rt.cpan.org/Ticket/Display.html?id=36442
+sub bad_content_encoding :Global {
+ my($self, $c) = @_;
+ $c->res->content_encoding('duff');
+ $c->res->body('foo');
+}
+
1;
More information about the Catalyst-commits
mailing list