X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fsearch.t;h=ccf0f7463588eb6a68870c5cd67b049588a695b7;hb=4790a0dbd7b297e087713c6ff2e63bf7deee4d04;hp=6b1aa2a31120e1d43dd11f718dcd7400c1b8d119;hpb=3d41aa23f35501ca92aab8aa42980fa73f7fa74f;p=public-inbox.git diff --git a/t/search.t b/t/search.t index 6b1aa2a3..ccf0f746 100644 --- a/t/search.t +++ b/t/search.t @@ -89,7 +89,7 @@ sub filter_mids { { $rw_commit->(); $ro->reopen; - my $found = $ro->lookup_message(''); + my $found = $ro->first_smsg_by_mid('root@s'); ok($found, "message found"); is($root_id, $found->{doc_id}, 'doc_id set correctly'); is($found->mid, 'root@s', 'mid set correctly'); @@ -264,7 +264,7 @@ sub filter_mids { ], body => "LOOP!\n")); ok($doc_id > 0, "doc_id defined with circular reference"); - my $smsg = $rw->lookup_message('circle@a'); + my $smsg = $rw->first_smsg_by_mid('circle@a'); is($smsg->references, '', "no references created"); my $msg = PublicInbox::SearchMsg->load_doc($smsg->{doc}); is($s, $msg->subject, 'long subject not rewritten'); @@ -281,7 +281,7 @@ sub filter_mids { my $mime = Email::MIME->new($str); my $doc_id = $rw->add_message($mime); ok($doc_id > 0, 'message indexed doc_id with UTF-8'); - my $smsg = $rw->lookup_message('testmessage@example.com'); + my $smsg = $rw->first_smsg_by_mid('testmessage@example.com'); my $msg = PublicInbox::SearchMsg->load_doc($smsg->{doc}); is($mime->header('Subject'), $msg->subject, 'UTF-8 subject preserved');