PAGI
view release on metacpan or search on metacpan
lib/PAGI/Cookbook.pod view on Meta::CPAN
=head1 TESTING
Use L<PAGI::Test::Client> to test apps directly without a running server:
use strict;
use warnings;
use Test2::V0;
use PAGI::Test::Client;
# Load your app
my $app = require './app.pl';
my $client = PAGI::Test::Client->new(app => $app);
subtest 'GET /' => sub {
my $res = $client->get('/');
is $res->status, 200, 'status is 200';
like $res->text, qr/Hello/, 'body contains Hello';
};
subtest 'POST /api/users' => sub {
my $res = $client->post('/api/users',
( run in 2.388 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )