X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Flive_engine_request_body.t;h=0abe1752d1f26dbfac839721a4de9a8bec4dfe1e;hp=f5c506682f5563fe9523b6e2d5007bc4b5feb8ec;hb=7064f69b1dfb59d1f3bad647b2097d0320acce8a;hpb=42da66a91b0a87ebb81d8552bcd0b05d3557c83e diff --git a/t/aggregate/live_engine_request_body.t b/t/aggregate/live_engine_request_body.t index f5c5066..0abe175 100644 --- a/t/aggregate/live_engine_request_body.t +++ b/t/aggregate/live_engine_request_body.t @@ -1,12 +1,10 @@ -#!perl - use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; -use Test::More tests => 18; +use Test::More tests => 23; use Catalyst::Test 'TestApp'; use Catalyst::Request; @@ -39,6 +37,7 @@ use HTTP::Request::Common; isa_ok( $creq, 'Catalyst::Request' ); is( $creq->method, 'POST', 'Catalyst::Request method' ); is( $creq->content_type, 'text/plain', 'Catalyst::Request Content-Type' ); + is( $creq->{__body_type}, 'File::Temp' ); is( $creq->content_length, $request->content_length, 'Catalyst::Request Content-Length' ); } @@ -72,6 +71,21 @@ use HTTP::Request::Common; isa_ok( $creq, 'Catalyst::Request' ); is( $creq->method, 'POST', 'Catalyst::Request method' ); is( $creq->content_type, 'text/plain', 'Catalyst::Request Content-Type' ); + is( $creq->{__body_type}, 'File::Temp' ); 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/dump/response', + 'Content-Type' => 'text/plain', + 'Content' => 'x' x 100_000 + ); + + ok( my $response = request($request), 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + ok( $response->header('X-Have-Request-Body'), 'X-Have-Request-Body set' ); +} +