From f9a9d71be917192835008ecebdd0302c088426e7 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Sat, 3 Sep 2022 13:08:03 -0400 Subject: [PATCH] Test for single-remark view --- README.md | 1 - t/remark.t | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 t/remark.t diff --git a/README.md b/README.md index 4c0e74d..8516af1 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ Run the tests locally (against development environment) ## TODOs -1. More tests (single remark view at least... maybe more) 1. Grow into Mojo hybrid ## Crazy future ideas diff --git a/t/remark.t b/t/remark.t new file mode 100644 index 0000000..0f40a6a --- /dev/null +++ b/t/remark.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('/remark/1')->status_is(200)->text_like(h2 => qr/Remark - #1/); + +done_testing();