From: Robert Buels Date: Wed, 8 Jun 2011 22:35:52 +0000 (+0000) Subject: make broken-headerless-CGI content-length test a little more illustrative X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FHTTP-Request-AsCGI.git;a=commitdiff_plain;h=f1f11f0e89e132a8b9fb928f82f18297a92a1a01 make broken-headerless-CGI content-length test a little more illustrative --- diff --git a/t/06response.t b/t/06response.t index c61034a..f0c6a1a 100644 --- a/t/06response.t +++ b/t/06response.t @@ -46,7 +46,13 @@ is_deeply( [ $response->header('X-Field') ], [ 1, 2 ], 'Response Header X-Field' $c->setup; - print "Look at me I am crappy and don't have any headers."; + print <restore->response; } @@ -55,6 +61,6 @@ isa_ok( $response, 'HTTP::Response' ); is( $response->code, 200, 'Response Code' ); is( $response->message, 'OK', 'Response Message' ); is( $response->protocol, 'HTTP/1.1', 'Response Protocol' ); -is( $response->content, "Look at me I am crappy and don't have any headers.", 'Response Content' ); -is( $response->content_length, 50, 'Response Content-Length is right!' ); +like( $response->content, qr/Oh yes/, 'Response Content' ); +is( $response->content_length, 93, 'Response Content-Length is right!' ); is( $response->content_type, '', 'Response Content-Type is blank' );