guestbook-ng/t/basic.t

21 lines
429 B
Perl
Raw Normal View History

2021-12-04 03:06:03 -05:00
#!/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);
2021-12-11 19:01:43 -05:00
my %form = (
name => 'swagg boi',
message => 'Ayy... lmao'
);
$t->ua->max_redirects(10);
2021-12-04 03:06:03 -05:00
$t->get_ok('/')->status_is(200);
2021-12-11 19:01:43 -05:00
$t->get_ok('/sign')->status_is(200);
$t->post_ok('/sign', form => \%form)->status_is(200);
2021-12-04 03:06:03 -05:00
done_testing();