X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FRoot.pm;h=ce3ee757de9a07f79b8a3ebcc83021356204f89d;hb=2688734f3a611b95e5c1f82c0c248c462d1eaa6b;hp=e34eacdebfe615b454f5147299076bfbf97aa726;hpb=bcc7361a26b0c7a55eb6b4d49d4622367b12f809;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index e34eacd..ce3ee75 100644 --- a/t/lib/TestApp/Controller/Root.pm +++ b/t/lib/TestApp/Controller/Root.pm @@ -75,6 +75,13 @@ EndOfBody $c->response->body($body); } +sub body_semipredicate : Local { + my ($self, $c) = @_; + $c->res->body; # Old code tests length($c->res->body), which causes the value to be built (undef), which causes the predicate + $c->res->status( $c->res->has_body ? 500 : 200 ); # to return the wrong thing, resulting in a 500. + $c->res->body('Body'); +} + sub end : Private { my ($self,$c) = @_; }