X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fpsgi_text.t;h=944a647637ba011140808c19c1de5650833dd1d6;hb=1317fb7b4ace03f6d9dfb1a42ee5f9371a1bf913;hp=bf565f83dbd46a83813311dcf2db906600115dec;hpb=adecbd43d2eed046fe6e88a459d03567461fd84b;p=public-inbox.git
diff --git a/t/psgi_text.t b/t/psgi_text.t
index bf565f83..944a6476 100644
--- a/t/psgi_text.t
+++ b/t/psgi_text.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 all contributors
+# Copyright (C) 2016-2019 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -21,10 +21,10 @@ use PublicInbox::Config;
use PublicInbox::WWW;
use_ok 'PublicInbox::WwwText';
use Plack::Builder;
-my $config = PublicInbox::Config->new({
- "$cfgpfx.address" => $addr,
- "$cfgpfx.mainrepo" => $maindir,
-});
+my $config = PublicInbox::Config->new(\<new($config);
@@ -34,6 +34,13 @@ test_psgi(sub { $www->call(@_) }, sub {
$res = $cb->(GET('/test/_/text/help/'));
like($res->content, qr!public-inbox help.*!,
'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();