[Catalyst-commits] r14334 - in trunk/Catalyst-Plugin-SubRequest/t:
. lib/TestApp/Controller
edenc at dev.catalyst.perl.org
edenc at dev.catalyst.perl.org
Mon Aug 6 21:19:50 GMT 2012
Author: edenc
Date: 2012-08-06 21:19:50 +0000 (Mon, 06 Aug 2012)
New Revision: 14334
Modified:
trunk/Catalyst-Plugin-SubRequest/t/02subreq.t
trunk/Catalyst-Plugin-SubRequest/t/lib/TestApp/Controller/Root.pm
Log:
adding test case contributed by nebulous
Modified: trunk/Catalyst-Plugin-SubRequest/t/02subreq.t
===================================================================
--- trunk/Catalyst-Plugin-SubRequest/t/02subreq.t 2012-08-06 21:19:01 UTC (rev 14333)
+++ trunk/Catalyst-Plugin-SubRequest/t/02subreq.t 2012-08-06 21:19:50 UTC (rev 14334)
@@ -1,6 +1,6 @@
package main;
-use Test::More tests => 18;
+use Test::More tests => 21;
use lib 't/lib';
use Catalyst::Test 'TestApp';
use File::stat;
@@ -43,3 +43,9 @@
is( $response->code, 200, 'OK status code' );
is( $response->content, 'foo33', 'Normal request content', );
}
+
+{
+ ok( my $response = request('/doublesubtest'), 'Double Sub Request' );
+ is( $response->code, 200, 'OK status code' );
+ is( $response->content, '1531633', 'Normal Double request content', ); #we get 153 right now
+}
Modified: trunk/Catalyst-Plugin-SubRequest/t/lib/TestApp/Controller/Root.pm
===================================================================
--- trunk/Catalyst-Plugin-SubRequest/t/lib/TestApp/Controller/Root.pm 2012-08-06 21:19:01 UTC (rev 14333)
+++ trunk/Catalyst-Plugin-SubRequest/t/lib/TestApp/Controller/Root.pm 2012-08-06 21:19:50 UTC (rev 14334)
@@ -60,6 +60,14 @@
$c->res->body($c->res->body());
}
+sub doublesubtest :Global {
+ my ( $self, $c) = @_;
+ $c->res->body(
+ $c->subrequest('/normal/5').
+ $c->subrequest('/normal/6')
+ );
+}
+
sub end : Private {
my ( $self, $c ) = @_;
$c->res->body($c->res->body().'3');
More information about the Catalyst-commits
mailing list