X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fsearch.t;h=839a320ae6c63c0fb0ce43e6bac17dd6b58f3530;hb=4da62f284003d75abe7cb35594414eb2224f42bc;hp=b9aa995b51623e6a59680525a4aa386852157b78;hpb=7b912e87e18c4a30be866e9abc764f71c61f29a2;p=public-inbox.git
diff --git a/t/search.t b/t/search.t
index b9aa995b..839a320a 100644
--- a/t/search.t
+++ b/t/search.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2019 all contributors
+# Copyright (C) 2015-2020 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -229,7 +229,7 @@ $ibx->with_umask(sub {
$rw_commit->();
$ro->reopen;
my $t = $ro->{over_ro}->get_thread('root@s');
- is(scalar(@$t), 4, "got all 4 mesages in thread");
+ is(scalar(@$t), 4, "got all 4 messages in thread");
my @exp = sort($long_reply_mid, 'root@s', 'last@s', $long_mid);
@res = filter_mids($t);
is_deeply(\@res, \@exp, "get_thread works");
@@ -319,14 +319,14 @@ $ibx->with_umask(sub {
my $mset = $ro->query('t:list@example.com', {mset => 1});
is($mset->size, 6, 'searched To: successfully');
foreach my $m ($mset->items) {
- my $smsg = $ro->lookup_article($m->get_docid);
+ my $smsg = $ro->{over_ro}->get_art($m->get_docid);
like($smsg->to, qr/\blist\@example\.com\b/, 'to appears');
}
$mset = $ro->query('tc:list@example.com', {mset => 1});
is($mset->size, 6, 'searched To+Cc: successfully');
foreach my $m ($mset->items) {
- my $smsg = $ro->lookup_article($m->get_docid);
+ my $smsg = $ro->{over_ro}->get_art($m->get_docid);
my $tocc = join("\n", $smsg->to, $smsg->cc);
like($tocc, qr/\blist\@example\.com\b/, 'tocc appears');
}
@@ -335,7 +335,7 @@ $ibx->with_umask(sub {
my $mset = $ro->query($pfx . 'foo@example.com', { mset => 1 });
is($mset->items, 1, "searched $pfx successfully for Cc:");
foreach my $m ($mset->items) {
- my $smsg = $ro->lookup_article($m->get_docid);
+ my $smsg = $ro->{over_ro}->get_art($m->get_docid);
like($smsg->cc, qr/\bfoo\@example\.com\b/,
'cc appears');
}
@@ -432,7 +432,11 @@ $ibx->with_umask(sub {
}
$rw->unindex_blob($amsg);
$rw->commit_txn_lazy;
- is($ro->lookup_article($art->{num}), undef, 'gone from OVER DB') if defined($art);
+ SKIP: {
+ skip('$art not defined', 1) unless defined $art;
+ is($ro->{over_ro}->get_art($art->{num}), undef,
+ 'gone from OVER DB');
+ };
});
my $all_mask = 07777;