diff options
author | Eric Wong <e@80x24.org> | 2021-08-26 12:33:35 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-08-28 10:37:01 +0000 |
commit | 2548e95f8f895523cb27ec310c3cfac1ab310025 (patch) | |
tree | 2bb2e869bb65f1cba6db45172a65b7e1fdfcbd37 /t | |
parent | 4363e6037fa7d597294186f60373e9de8e1b3d74 (diff) | |
download | public-inbox-2548e95f8f895523cb27ec310c3cfac1ab310025.tar.gz |
extindex doesn't use the same config stuff as normal "publicinbox" entries, so we'll need a separate function for them.
Diffstat (limited to 't')
-rw-r--r-- | t/extindex-psgi.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/extindex-psgi.t b/t/extindex-psgi.t index 6f62b5a0..b9acc979 100644 --- a/t/extindex-psgi.t +++ b/t/extindex-psgi.t @@ -40,6 +40,18 @@ my $client = sub { 'Host: header respected in Atom feed'); unlike($res->content, qr!http://bogus\.example\.com/!s, 'default URL ignored with different host header'); + + $res = $cb->(GET('/all/_/text/config/')); + is($res->code, 200, '/text/config HTML'); + $res = $cb->(GET('/all/_/text/config/raw')); + is($res->code, 200, '/text/config raw'); + my $f = "$tmpdir/extindex.config"; + open my $fh, '>', $f or xbail $!; + print $fh $res->content or xbail $!; + close $fh or xbail $!; + my $cfg = PublicInbox::Config->git_config_dump($f); + is($?, 0, 'no errors from git-config parsing'); + ok($cfg->{'extindex.all.topdir'}, 'extindex.topdir defined'); }; test_psgi(sub { $www->call(@_) }, $client); %$env = (%$env, TMPDIR => $tmpdir, PI_CONFIG => $pi_config); |