From 62072c2a50dcf8a34ea9fe02ab302cc22c655212 Mon Sep 17 00:00:00 2001 From: swag Date: Sat, 4 Dec 2021 03:06:03 -0500 Subject: [PATCH] Implement basic tests --- t/basic.t | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 t/basic.t diff --git a/t/basic.t b/t/basic.t new file mode 100644 index 0000000..ee9020a --- /dev/null +++ b/t/basic.t @@ -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();