X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fpsgi_v2.t;h=c7550e2d1e84355e6cc17c41e5ec3af80f98b2b1;hb=4821798351defce82c102e46d6f5f84f0cdc0e34;hp=a84566d923e788883c71818dd4b914fa19c83e91;hpb=c477bdd8a80eecc319b680764edfb24bd12cb7b2;p=public-inbox.git
diff --git a/t/psgi_v2.t b/t/psgi_v2.t
index a84566d9..c7550e2d 100644
--- a/t/psgi_v2.t
+++ b/t/psgi_v2.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 all contributors
+# Copyright (C) 2018-2019 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -18,9 +18,9 @@ foreach my $mod (@mods) {
}
use_ok($_) for @mods;
use_ok 'PublicInbox::V2Writable';
-my $mainrepo = tempdir('pi-v2_dupes-XXXXXX', TMPDIR => 1, CLEANUP => 1);
+my $inboxdir = tempdir('pi-v2_dupes-XXXXXX', TMPDIR => 1, CLEANUP => 1);
my $ibx = {
- mainrepo => $mainrepo,
+ inboxdir => $inboxdir,
name => 'test-v2writable',
version => 2,
-primary_address => 'test@example.com',
@@ -54,11 +54,11 @@ $new_mid = $mids->[1];
$im->done;
my $cfgpfx = "publicinbox.v2test";
-my $cfg = {
- "$cfgpfx.address" => $ibx->{-primary_address},
- "$cfgpfx.mainrepo" => $mainrepo,
-};
-my $config = PublicInbox::Config->new($cfg);
+my $cfg = <{-primary_address}
+$cfgpfx.inboxdir=$inboxdir
+EOF
+my $config = PublicInbox::Config->new(\$cfg);
my $www = PublicInbox::WWW->new($config);
my ($res, $raw, @from_);
test_psgi(sub { $www->call(@_) }, sub {
@@ -168,7 +168,7 @@ test_psgi(sub { $www->call(@_) }, sub {
@from_ = ($raw =~ m/>From: /mg);
is(scalar(@from_), 3, 'three From: lines');
foreach my $mid ('a-mid@b', $new_mid, $third) {
- like($raw, qr/<\Q$mid\E>/s, "Message-ID $mid shown");
+ like($raw, qr!>\Q$mid\E!s, "Message-ID $mid shown");
}
like($raw, qr/\b3\+ messages\b/, 'thread overview shown');