Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: c21de96ddc
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (20 sloc) 0.536 kB
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Plack::Test::Agent;
my $app = sub
{
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ];
};
my $agent = Plack::Test::Agent->new(
app => $app,
server => 'HTTP::Server::PSGI',
);
my $res = $agent->get( 'http://localhost/hello' );
is $res->content, 'Hello World';
is $res->content_type, 'text/plain';
is $res->code, 200;
is $res->header( 'Server' ), 'HTTP::Server::PSGI',
'... should use server when given server';
done_testing;
Jump to Line
Something went wrong with that request. Please try again.