From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 78ADE1F83C for ; Fri, 4 Jan 2019 13:10:41 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/6] t/cgi.t: remove redundant redirect check Date: Fri, 4 Jan 2019 13:10:34 +0000 Message-Id: <20190104131038.32233-3-e@80x24.org> In-Reply-To: <20190104131038.32233-1-e@80x24.org> References: <20190104131038.32233-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: t/plack.t already has the same test. --- t/cgi.t | 8 -------- t/plack.t | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/t/cgi.t b/t/cgi.t index ac2c69f..06519c3 100644 --- a/t/cgi.t +++ b/t/cgi.t @@ -195,14 +195,6 @@ EOF } } -# redirect list-name-only URLs -{ - local $ENV{HOME} = $home; - my $res = cgi_run("/test"); - like($res->{head}, qr/Status: 301 Moved/, "redirected status"); - like($res->{head}, qr!/test/!, "redirected with slash"); -} - done_testing(); sub run_with_env { diff --git a/t/plack.t b/t/plack.t index 7eb7d7f..70cd20e 100644 --- a/t/plack.t +++ b/t/plack.t @@ -92,7 +92,8 @@ EOF my $to = "$from/"; my $res = $cb->(GET($from)); is(301, $res->code, 'is permanent redirect'); - is($to, $res->header('Location'), 'redirect location matches'); + is($to, $res->header('Location'), + 'redirect location matches with trailing slash'); }); my $pfx = 'http://example.com/test'; -- EW