]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/extindex-psgi.t
move ->ids_after from mm to over
[public-inbox.git] / t / extindex-psgi.t
index 6f62b5a035be0cd040a78876f8609116e4d5d4a7..d47616417a525b5b48a468141d8e03a25863c0d5 100644 (file)
@@ -40,6 +40,21 @@ 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');
+
+       $res = $cb->(GET('/all/all.mbox.gz'));
+       is($res->code, 200, 'all.mbox.gz');
 };
 test_psgi(sub { $www->call(@_) }, $client);
 %$env = (%$env, TMPDIR => $tmpdir, PI_CONFIG => $pi_config);