summaryrefslogtreecommitdiff
path: root/t/spore-response/headers.t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-09-13 13:31:56 +0200
committerfranck cuny <franck@lumberjaph.net>2010-09-13 13:31:56 +0200
commit3e3dc478fc9b4eb90681df89156dfcc8f7f81481 (patch)
treeb9788b0d48f524bc4c0aeeb48c744a8f7b097910 /t/spore-response/headers.t
downloadnet-http-spore-3e3dc478fc9b4eb90681df89156dfcc8f7f81481.tar.gz
initial import
Diffstat (limited to '')
-rw-r--r--t/spore-response/headers.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/spore-response/headers.t b/t/spore-response/headers.t
new file mode 100644
index 0000000..b9cf319
--- /dev/null
+++ b/t/spore-response/headers.t
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Net::HTTP::Spore::Response;
+
+my $status = 200;
+my $body = '{"foo":1}';
+my $ct = 'application/json';
+my $cl = length($body);
+
+my $response =
+ Net::HTTP::Spore::Response->new( $status,
+ [ 'Content-Type', $ct, 'Content-Length', length($body) ], $body );
+
+is $response->content_type, $ct;
+is $response->content_length, $cl;
+is $response->status, 200;
+
+done_testing;