APISchema
view release on metacpan or search on metacpan
t/Plack-Middleware-APISchema-RequestValidator.t view on Meta::CPAN
is $res->code, 200;
done_testing;
}
};
subtest 'when valid utf8 request' => sub {
test_psgi $middleware => sub {
my $server = shift;
my $res = $server->(
POST '/bmi',
Content_Type => 'application/json; charset=UTF-8',
Content => encode_json({weight => 50, height => 1.6}),
);
is $res->code, 200;
done_testing;
}
};
subtest 'when invalid request' => sub {
test_psgi $middleware => sub {
my $server = shift;
( run in 0.605 second using v1.01-cache-2.11-cpan-49f99fa48dc )