about summary refs log tree commit
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-12-26 06:48:03 +0000
committerEric Wong <e@80x24.org>2019-12-26 07:27:02 +0000
commit8fc1018bd620b543c13a3c2f6cb743b7f435d43d (patch)
tree1a21085aae136aedc0a9ef225f9f3695b140ef0f /t
parent39ac2f20f40c202b9ef0278c477cd4ba91573163 (diff)
downloadpublic-inbox-8fc1018bd620b543c13a3c2f6cb743b7f435d43d.tar.gz
We now have coverage for PublicInbox::WwwListing::list_all.
Diffstat (limited to 't')
-rw-r--r--t/www_listing.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/www_listing.t b/t/www_listing.t
index 2ff053de..e785ae9b 100644
--- a/t/www_listing.t
+++ b/t/www_listing.t
@@ -31,7 +31,10 @@ like(PublicInbox::WwwListing::fingerprint($bare), qr/\A[a-f0-9]{40}\z/,
 sub tiny_test {
         my ($json, $host, $port) = @_;
         my $http = HTTP::Tiny->new;
-        my $res = $http->get("http://$host:$port/manifest.js.gz");
+        my $res = $http->get("http://$host:$port/");
+        is($res->{status}, 200, 'got HTML listing');
+        like($res->{content}, qr!</html>!si, 'listing looks like HTML');
+        $res = $http->get("http://$host:$port/manifest.js.gz");
         is($res->{status}, 200, 'got manifest');
         my $tmp;
         IO::Uncompress::Gunzip::gunzip(\(delete $res->{content}) => \$tmp);
@@ -85,6 +88,8 @@ SKIP: {
         ok(unlink("$bare->{git_dir}/description"), 'removed bare/description');
         open $fh, '>', $cfgfile or die;
         print $fh <<"" or die;
+[publicinbox]
+        wwwlisting = all
 [publicinbox "bare"]
         inboxdir = $bare->{git_dir}
         url = http://$host/bare