diff --git a/t/remark.t b/t/remark.t index a9a1acc..492f645 100644 --- a/t/remark.t +++ b/t/remark.t @@ -66,9 +66,15 @@ subtest 'Flagging remark', sub { ->element_exists('a[href*="flag"]') ->text_like(h2 => qr/Remark #1/); - $t->get_ok('/remark/flag/1')->status_is(200) + $t->get_ok('/human/remark/flag/1')->status_is(302) + ->header_like(Location => qr/captcha/); + + # Solved CAPTCHA + $tx->req->cookies({is_human => 1}); + + $t->get_ok('/human/thread/flag/1')->status_is(200) ->element_exists('p[class="stash-with-info"]') - ->text_like(p => qr/Remark #1 has been flagged/); + ->text_like(p => qr/Thread #1 has been flagged/); }; done_testing; diff --git a/t/thread.t b/t/thread.t index 3e2924f..9dcb01f 100644 --- a/t/thread.t +++ b/t/thread.t @@ -96,7 +96,13 @@ subtest 'Bumping thread', sub { ->element_exists('a[href*="bump"]') ->text_like(h2 => qr/Thread #1/); - $t->get_ok('/thread/bump/1')->status_is(200) + $t->get_ok('/human/thread/bump/1')->status_is(302) + ->header_like(Location => qr/captcha/); + + # Solved CAPTCHA + $tx->req->cookies({is_human => 1}); + + $t->get_ok('/human/thread/bump/1')->status_is(200) ->element_exists('p[class="stash-with-info"]') ->text_like(p => qr/Thread #1 has been bumped/); }; @@ -110,7 +116,13 @@ subtest 'Flagging thread', sub { ->element_exists('a[href*="flag"]') ->text_like(h2 => qr/Thread #1/); - $t->get_ok('/thread/flag/1')->status_is(200) + $t->get_ok('/human/thread/flag/1')->status_is(302) + ->header_like(Location => qr/captcha/); + + # Solved CAPTCHA + $tx->req->cookies({is_human => 1}); + + $t->get_ok('/human/thread/flag/1')->status_is(200) ->element_exists('p[class="stash-with-info"]') ->text_like(p => qr/Thread #1 has been flagged/); };