summaryrefslogblamecommitdiff
path: root/t/spore-response/response.t
blob: 56be6d298826b287198a03e00c5545ff01dd1977 (plain) (tree)






















                                              
use strict;
use warnings;
use Test::More;
use Net::HTTP::Spore::Response;

sub res {
    my $res = Net::HTTP::Spore::Response->new;
    my %v   = @_;
    while ( my ( $k, $v ) = each %v ) {
        $res->$k($v);
    }
    $res->finalize;
}

is_deeply(
    res(
        status => 200,
        body   => 'hello',
    ),
    [ 200, +[], 'hello' ]
);

done_testing;