about summary refs log tree commit homepage
path: root/t/psgi_text.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-09-27 10:48:25 +0000
committerEric Wong <e@80x24.org>2019-09-27 10:50:01 +0000
commit2052e92ba1f75efca6935558ea01898d01751f40 (patch)
tree69e38274109f7d297e59a663135c5912d8c6c49a /t/psgi_text.t
parenta74dcf96dc6113e27762ef5debdc8ec4e2db2296 (diff)
downloadpublic-inbox-2052e92ba1f75efca6935558ea01898d01751f40.tar.gz
This returns a git-config(1)-compatible file to make it easier
to get started on mirroring an existing public-inbox.  Omitting
the "raw" from the URL works, as well, but I'm not sure if
it's very useful.
Diffstat (limited to 't/psgi_text.t')
-rw-r--r--t/psgi_text.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/psgi_text.t b/t/psgi_text.t
index 9979e7b3..bdc1ebfd 100644
--- a/t/psgi_text.t
+++ b/t/psgi_text.t
@@ -34,6 +34,13 @@ test_psgi(sub { $www->call(@_) }, sub {
         $res = $cb->(GET('/test/_/text/help/'));
         like($res->content, qr!<title>public-inbox help.*</title>!,
                 'default help');
+        $res = $cb->(GET('/test/_/text/config/raw'));
+        my $f = "$tmpdir/cfg";
+        open my $fh, '>', $f or die;
+        print $fh $res->content or die;
+        close $fh or die;
+        my $cfg = PublicInbox::Config->new($f);
+        is($cfg->{"$cfgpfx.address"}, $addr, 'got expected address in config');
 });
 
 done_testing();