]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei_xsearch.t
lei <q|up>: set \Recent on non-empty mbox and Maildir
[public-inbox.git] / t / lei_xsearch.t
index 68211d181339d574b69d43b3681b1fe86a8623b0..3eb442338ddc4dd8b919b5e60a56aab126284a91 100644 (file)
@@ -3,7 +3,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use v5.10.1;
-use List::Util qw(shuffle max);
+use List::Util qw(shuffle);
 use PublicInbox::TestCommon;
 use PublicInbox::Eml;
 require_mods(qw(DBD::SQLite Search::Xapian));
@@ -62,9 +62,6 @@ is(scalar(@msgs), $nr, 'smsgs retrieved for all');
 
 $mset = $lxs->recent(undef, { limit => 1 });
 is($mset->size, 1, 'one result');
-my $max = max(map { $_->{docid} } @msgs);
-is($lxs->smsg_for(($mset->items)[0])->{docid}, $max,
-       'got highest docid');
 
 my @ibxish = $lxs->locals;
 is(scalar(@ibxish), scalar(@ibx) + 1, 'got locals back');
@@ -90,7 +87,7 @@ is($lxs->over, undef, '->over fails');
        my $mitem = ($mset->items)[0];
        my $smsg = $lxs->smsg_for($mitem) or BAIL_OUT 'smsg_for broken';
 
-       my $ale = PublicInbox::LeiALE->new("$home/ale");
+       my $ale = PublicInbox::LeiALE::_new("$home/ale");
        $ale->refresh_externals($lxs);
        my $exp = [ $smsg->{blob}, 'blob', -s 't/utf8.eml' ];
        is_deeply([ $ale->git->check($smsg->{blob}) ], $exp, 'ale->git->check');