about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-03-03 22:07:19 +0000
committerEric Wong <e@80x24.org>2017-03-03 22:12:19 +0000
commitb2492cc6ef642640c901ccca5ff96b9228cd10ec (patch)
tree4b9d730886d9a638388cf43ab1b8a7ff74bb4c33 /t
parent3fb3433282f2c805878d5e6f02e2b04534cd5906 (diff)
downloadpublic-inbox-b2492cc6ef642640c901ccca5ff96b9228cd10ec.tar.gz
Implying a tip would make for ambiguous URLs and ruin
caching, so try to get everybody to hit the same URL.
This also simplifies some of our other code since
the tip is always in the request.
Diffstat (limited to 't')
-rw-r--r--t/repobrowse_git_src.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/repobrowse_git_src.t b/t/repobrowse_git_src.t
index 4d16eac4..aa341d38 100644
--- a/t/repobrowse_git_src.t
+++ b/t/repobrowse_git_src.t
@@ -14,6 +14,11 @@ test_psgi($test->{app}, sub {
         like($noslash_body, qr{href="dir/dur">dur/</a>},
                 'path ok w/o slash');
 
+        $req = 'http://example.com/test.git/src';
+        $res = $cb->(GET($req));
+        is(302, $res->code, 'got 302 response from dir');
+        is("$req/master", $res->header('Location'), 'redirected to tip');
+
         my $slash = $req . '/';
         my $r2 = $cb->(GET($slash));
         is(301, $r2->code, 'got 301 response from dir with slash');