X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fplack.t;h=8d8aa10088d1c0b8afafb33f101de38a08410d6f;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=37a6b39486e06ea1e4fc575893c3de96e09bc7f1;hpb=0283273a14e1871955f6a9132f4f3f7884ec8a3f;p=public-inbox.git
diff --git a/t/plack.t b/t/plack.t
index 37a6b394..8d8aa100 100644
--- a/t/plack.t
+++ b/t/plack.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2020 all contributors
+# Copyright (C) 2014-2021 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -21,8 +21,8 @@ ok(-f $psgi, "psgi example file found");
my $pfx = 'http://example.com/test';
ok(run_script(['-init', 'test', $inboxdir, "$pfx/", $addr]),
'initialized repo');
-PublicInbox::Import::run_die([qw(git config -f), $pi_config,
- 'publicinbox.test.newsgroup', 'inbox.test']);
+xsys_e(qw(git config -f), $pi_config,
+ qw(publicinbox.test.newsgroup inbox.test));
open my $fh, '>', "$inboxdir/description" or die "open: $!\n";
print $fh "test for public-inbox\n";
close $fh or die "close: $!\n";
@@ -45,7 +45,7 @@ EOF
$im->add($mime);
$im->done;
my $rev = $git->qx(qw(rev-list HEAD));
- like($rev, qr/\A[a-f0-9]{40}/, "good revision committed");
+ like($rev, qr/\A[a-f0-9]{40,}/, "good revision committed");
@ls = $git->qx(qw(ls-tree -r --name-only HEAD));
chomp @ls;
@@ -209,6 +209,10 @@ test_psgi($app, sub {
my $res = $cb->(GET($pfx . '/blah@example.com/raw'));
is(200, $res->code, 'success response received for /*/raw');
like($res->content, qr!^From !sm, "mbox returned");
+
+ $res = $cb->(GET($pfx . '/blah@example.com/t.mbox.gz'));
+ is(501, $res->code, '501 when overview missing');
+ like($res->content, qr!\bOverview\b!, 'overview omission noted');
});
# legacy redirects