Fix C::Request disparity between _body and body accessors, TODO test now passes.
[catagits/Catalyst-Runtime.git] / t / aggregate / live_engine_request_body.t
index f5c5066..40d7ab2 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 
-use Test::More tests => 18;
+use Test::More tests => 21;
 use Catalyst::Test 'TestApp';
 
 use Catalyst::Request;
@@ -75,3 +75,17 @@ use HTTP::Request::Common;
     is( $creq->content_length, $request->content_length,
         'Catalyst::Request Content-Length' );
 }
+
+# 5.80 regression, see note in Catalyst::Plugin::Test::Plugin
+{
+    my $request = GET(
+        'http://localhost/have_req_body_in_prepare_action',
+        'Content-Type' => 'text/plain',
+        'Content'      => 'x' x 100_000
+    );
+
+    ok( my $response = request($request), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    like( $response->content, qr/^[1-9]/, 'Has body' );
+}
+