From 8fc1018bd620b543c13a3c2f6cb743b7f435d43d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 26 Dec 2019 06:48:03 +0000 Subject: t/www_listing: test "all" HTML listing We now have coverage for PublicInbox::WwwListing::list_all. --- t/www_listing.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 't') 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!!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 -- cgit v1.2.3-24-ge0c7