]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_v2.t
compact: do not merge v2 repos by default
[public-inbox.git] / t / psgi_v2.t
index aa3279cc6870743e43f62efb4b8f98141d4a7193..faa139fb7aa2a64ae0405d5124071ce271e995b7 100644 (file)
@@ -129,6 +129,7 @@ test_psgi(sub { $www->call(@_) }, sub {
                is(scalar(@from_), 3, 'three From_ lines in t.mbox.gz');
 
                # search interface
+               $config->each_inbox(sub { $_[0]->search->reopen });
                $res = $cb->(POST('/v2test/?q=m:a-mid@b&x=m'));
                $in = $res->content;
                $status = IO::Uncompress::Gunzip::gunzip(\$in => \$out);
@@ -182,6 +183,9 @@ 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);
+       is_deeply(\@over, [ '<a', '` <a', '` <a', '` <a' ],
+               'duplicate messages share the same root');
 
        $res = $cb->(GET('/v2test/reuse@mid/t/'));
        $raw = $res->content;