]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/cgi.t: remove redundant redirect check
authorEric Wong <e@80x24.org>
Fri, 4 Jan 2019 08:55:04 +0000 (08:55 +0000)
committerEric Wong <e@80x24.org>
Fri, 4 Jan 2019 08:55:04 +0000 (08:55 +0000)
t/plack.t already has the same test.

t/cgi.t
t/plack.t

diff --git a/t/cgi.t b/t/cgi.t
index ac2c69fc8425485525e92f91ae81e90d0849eda4..06519c3e6164e29bed022df425aebdf8fe21f266 100644 (file)
--- 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 {
index 7eb7d7f2814fda2c4977e4bb268c366d39a8952a..70cd20e53306ab5bdfec34ac2d99fc1bf3c91f45 100644 (file)
--- 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';