1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
use strict;
use warnings;
use Test::More;
use FindBin;
use lib "$FindBin::Bin/../lib";
use Plack::Test;
use Plack::Builder;
use HTTP::Request::Common;
use Plack::Middleware::Magpie;
my $handler = builder {
enable "Magpie", context => {}, pipeline => [
'Core::Done::StepOne',
'Core::Done::StepTwo',
'Core::Basic::Output',
];
};
test_psgi
app => $handler,
client => sub {
my $cb = shift;
{
my $res = $cb->(GET "http://localhost/");
is $res->content, '', "DONE was called so the output handler shouldn't work.";
}
};
done_testing();
|