Test Content-Length
Christian Hansen [Sun, 4 Sep 2005 13:07:17 +0000 (13:07 +0000)]
t/01use.t

index 0fc29fe..b31a2d9 100644 (file)
--- a/t/01use.t
+++ b/t/01use.t
@@ -49,7 +49,8 @@ for my $format (qw/multipart urlencoded/) {
         is_deeply( $body->body, $results->{body}, "$num-$format body" );
         is_deeply( $body->param, $results->{param}, "$num-$format param" );
         is_deeply( $body->upload, $results->{upload}, "$num-$format upload" );
-        ok( $body->state eq 'done', "$num-$format state" );
+        cmp_ok( $body->state, 'eq', 'done', "$num-$format state" );
+        cmp_ok( $body->length, '==', $headers->{'Content-Length'}, "$num-$format length" );
     }
 }