From 746f7e6b6fbc0a9d6c5f9d05a7ba2fb27d9a241c Mon Sep 17 00:00:00 2001 From: swaggboi Date: Fri, 22 Jul 2022 18:43:01 -0400 Subject: [PATCH] Create a test; add some documentation --- README.md | 14 ++++++++++++++ t/root.t | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 t/root.t diff --git a/README.md b/README.md index ab4de57..8efa2b5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,20 @@ A textboard written in Perl +## Running locally + +Run it in development mode + + $ morbo PostText.pl + +Now try requesting http://localhost:3000 + +## Testing + +Run the tests locally (development mode) + + $ prove -l + ## TODOs 1. Where is prototype lmao diff --git a/t/root.t b/t/root.t new file mode 100644 index 0000000..66dd8c4 --- /dev/null +++ b/t/root.t @@ -0,0 +1,14 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; +use Mojo::File qw{curfile}; +use Test::Mojo; + +my $script = curfile->dirname->sibling('PostText.pl'); +my $t = Test::Mojo->new($script); + +$t->get_ok('/')->status_is(200); + +done_testing();