X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fpsgi_v2.t;h=65448dc435a3d9925942233c60f4fd98e3243d72;hb=f826a7830bce67c0f8c653baf97f7769bb2c57d9;hp=bdf23deb1c0080f382d1634712dc57070f2b2e1c;hpb=2b6580afae0c0449fa536b62c8fbad4408337a3f;p=public-inbox.git
diff --git a/t/psgi_v2.t b/t/psgi_v2.t
index bdf23deb..65448dc4 100644
--- a/t/psgi_v2.t
+++ b/t/psgi_v2.t
@@ -113,6 +113,7 @@ test_psgi(sub { $www->call(@_) }, sub {
like($raw, qr/^hello ghosts$/m, 'got third message');
@from_ = ($raw =~ m/^From /mg);
is(scalar(@from_), 3, 'three From_ lines');
+ $config->each_inbox(sub { $_[0]->search->reopen });
SKIP: {
eval { require IO::Uncompress::Gunzip };
@@ -149,6 +150,13 @@ test_psgi(sub { $www->call(@_) }, sub {
is(scalar(@from_), 3, 'three From_ lines in all.mbox');
};
+ $res = $cb->(GET('/v2test/?q=m:a-mid@b&x=t'));
+ is($res->code, 200, 'success with threaded search');
+ my $raw = $res->content;
+ ok($raw =~ s/\A.*>Results 1-3 of 3/s, 'got all results');
+ my @over = ($raw =~ m/\d{4}-\d+-\d+\s+\d+:\d+ (.+)$/gm);
+ is_deeply(\@over, [ '(GET('/v2test/a-mid@b/'));
$raw = $res->content;
@@ -182,7 +190,7 @@ test_psgi(sub { $www->call(@_) }, sub {
$res = $cb->(GET('/v2test/reuse@mid/T/'));
$raw = $res->content;
like($raw, qr/\b4\+ messages\b/, 'thread overview shown with /T/');
- my @over = ($raw =~ m/^\d{4}-\d+-\d+\s+\d+:\d+ (.+)$/gm);
+ @over = ($raw =~ m/^\d{4}-\d+-\d+\s+\d+:\d+ (.+)$/gm);
is_deeply(\@over, [ '