From fd0eba29d79ad2015ca14d92bb8048ebcac69c86 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Thu, 15 Aug 2024 19:59:41 -0400 Subject: [PATCH] Lil test for the search form too --- t/search.t | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/search.t b/t/search.t index cc82660..92201da 100644 --- a/t/search.t +++ b/t/search.t @@ -8,6 +8,12 @@ my %good_human = (answer => 1, number => 'Ⅰ'); my $search_url = '/captcha/H4sIABJ8PGUAA8soKSmw0tfPyU9OzMnILy6xMjYwMNDPKM1NzNMvTk0sSs4AAPrUR3kiAAAA%0A'; +subtest 'Search form', sub { + $t->get_ok('/thread/list') + ->element_exists('form input[name="q"]' ) + ->element_exists('form button[type="submit"]'); +}; + subtest 'Search before CAPTCHA', sub { $t->get_ok('/human/search')->status_is(302) ->header_like(Location => qr/captcha/);