summary refs log tree commit diff
path: root/t/spore-response/headers.t
blob: b9cf31937ce3a6e9f3df400c947fdca62f328e7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;