]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_multipart_not.t
config: support "inboxdir" in addition to "mainrepo"
[public-inbox.git] / t / psgi_multipart_not.t
index 4c9fa57ab74d2e24a406f8646846827bcc00f53d..40bc3c18c6c8e423c306521af87defbb95b2ef69 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -17,7 +17,7 @@ use_ok($_) for @mods;
 use_ok 'PublicInbox::V2Writable';
 my $repo = tempdir('pi-psgi-multipart-not.XXXXXX', TMPDIR => 1, CLEANUP => 1);
 my $ibx = PublicInbox::Inbox->new({
-       mainrepo => $repo,
+       inboxdir => $repo,
        name => 'multipart-not',
        version => 2,
        -primary_address => 'test@example.com',
@@ -42,11 +42,11 @@ ok($im->add($mime), 'added broken multipart message');
 $im->done;
 
 my $cfgpfx = "publicinbox.v2test";
-my $cfg = {
-       "$cfgpfx.address" => $ibx->{-primary_address},
-       "$cfgpfx.mainrepo" => $repo,
-};
-my $config = PublicInbox::Config->new($cfg);
+my $cfg = <<EOF;
+$cfgpfx.address=$ibx->{-primary_address}
+$cfgpfx.inboxdir=$repo
+EOF
+my $config = PublicInbox::Config->new(\$cfg);
 my $www = PublicInbox::WWW->new($config);
 
 my ($res, $raw);