Implement basic tests

This commit is contained in:
swag 2021-12-04 03:06:03 -05:00
parent 2f067bfabf
commit 62072c2a50

15
t/basic.t Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env perl
use Test::More;
use Mojo::File qw{curfile};
use Test::Mojo;
my $script = curfile->dirname->sibling('guestbook-ng.pl');
my $t = Test::Mojo->new($script);
# Just make sure we get a 200 OK for now
$t->get_ok('/')->status_is(200);
$t->get_ok('/test')->status_is(200);
$t->post_ok('/test' => form => {string => 'a'})->status_is(200);
done_testing();