Feersum
view release on metacpan or search on metacpan
t/63-plack-apps.t view on Meta::CPAN
my $cb = shift;
my $req = HTTP::Request->new(GET =>
"http://localhost/63-plack-apps.t");
my $res = $cb->($req);
my $s = "# IS THIS FILE"." STATICALLY SERVED?";
is $res->code, 200;
like $res->content, qr/^\Q$s\E$/m, "found static line";
}
);
cascaded: test_psgi(
app => builder {
mount '/' => Plack::App::Cascade->new(apps => [
Plack::App::File->new(root => 'notfound')->to_app,
Plack::App::File->new(root => 'me-neither')->to_app,
Plack::App::File->new(root => 't')->to_app,
]);
},
client => sub {
my $cb = shift;
my $req = HTTP::Request->new(GET =>
"http://localhost/63-plack-apps.t");
my $res = $cb->($req);
my $s = "# IS THIS FILE"." STATICALLY SERVED?";
is $res->code, 200;
like $res->content, qr/^\Q$s\E$/m, "found static line (cascade)";
}
);
via_redirect: test_psgi(
# these two tests fail randomly on some platforms with keep_alive on.
# from the pod...
# BUGS - Keep-alive is ignored completely.
ua => Plack::LWPish->new( no_proxy => [qw/127.0.0.1/], keep_alive => 0 ),
app => builder {
mount '/static' => Plack::App::Cascade->new(apps => [
t/63-plack-apps.t view on Meta::CPAN
$res->finalize;
};
},
client => sub {
my $cb = shift;
my $req = HTTP::Request->new(GET =>
"http://localhost/");
my $res = $cb->($req);
my $s = "# IS THIS FILE"." STATICALLY SERVED?";
is $res->code, 200;
like $res->content, qr/^\Q$s\E$/m, "found static line (cascade)";
}
);
__END__
# IS THIS FILE STATICALLY SERVED?
( run in 0.608 second using v1.01-cache-2.11-cpan-49f99fa48dc )