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

is(
    res(
        status => 500,
        body   => 'read timeout',
    ),
    "HTTP status: 500 - read timeout"
);

done_testing;