summaryrefslogtreecommitdiffstats
path: root/t/response-to_app.t
blob: 703953d21a3e8c9099a48b62b53f656d9a7c13cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Plack::Test;

use HTTP::Request::Common;
use Web::Response;

my $res = Web::Response->new(status => 200);
$res->content("hello");

test_psgi $res->to_app, sub {
    my $cb = shift;

    my $res = $cb->(GET "/");
    is $res->code, 200, 'response code';
    is $res->content, 'hello', 'content';
};

done_testing;