summaryrefslogblamecommitdiff
path: root/t/01_basic.t
blob: 630bd556a7394bfa8b96ebe85cf197203bed83aa (plain) (tree)


























                                                                              
use strict;
use warnings;
use Test::More;
use Plack::Builder;
use Plack::Test;
use HTTP::Request::Common;

my $handler = builder {
    enable "i18n";
    sub {
        [   '200', ['Content-Type' => 'text/html', 'Accept-Language' => 'fr'],
            ['Hello world']
        ];
    };
};

test_psgi
    app    => $handler,
    client => sub {
    my $cb = shift;
    {
        my $req = GET "http://localhost/";
        ok my $res = $cb->($req);
    }
};

done_testing();