From c9ffdd4760106c062ec356d1a3b09f689f9c49bd Mon Sep 17 00:00:00 2001 From: swag Date: Fri, 8 Apr 2022 15:56:06 -0400 Subject: [PATCH] Moar tests --- t/spam.t | 3 +++ t/view.t | 3 +++ 2 files changed, 6 insertions(+) diff --git a/t/spam.t b/t/spam.t index 958b558..d7d62c4 100644 --- a/t/spam.t +++ b/t/spam.t @@ -15,5 +15,8 @@ $t->get_ok('/spam')->status_is(200) ->text_is(h2 => 'Messages from the World Wide Web'); $t->get_ok('/spam/1')->status_is(200) ->text_is(h2 => 'Messages from the World Wide Web'); +# Page shouldn't exist (unless Guestbook gets very popular!) +$t->get_ok('/spam/1337')->status_is(404) + ->text_is(h2 => 'Messages from the World Wide Web'); done_testing(); diff --git a/t/view.t b/t/view.t index 54a9a04..542c963 100644 --- a/t/view.t +++ b/t/view.t @@ -15,5 +15,8 @@ $t->get_ok('/view')->status_is(200) ->text_is(h2 => 'Messages from the World Wide Web'); $t->get_ok('/view/1')->status_is(200) ->text_is(h2 => 'Messages from the World Wide Web'); +# Page shouldn't exist (unless Guestbook gets very popular!) +$t->get_ok('/view/1337')->status_is(404) + ->text_is(h2 => 'Messages from the World Wide Web'); done_testing();