diff options
author | Eric Wong <e@80x24.org> | 2020-09-02 11:04:16 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-09-03 20:11:03 +0000 |
commit | 80b887f29b2ec71d025b4c266a1c26314758994c (patch) | |
tree | 31f9937daf20c21b33c0407763bf2d6bd06d2f66 /t/mda_filter_rubylang.t | |
parent | 851aa7183cf2b152d7ff187729bc896597d22fad (diff) | |
download | public-inbox-80b887f29b2ec71d025b4c266a1c26314758994c.tar.gz |
search: replace ->query with ->mset
Nearly all of the search uses in the production code rely on a Xapian mset iterator being returned (instead of an array of $smsg objects). So default to returning the mset and move the burden of smsg array conversion into the test cases.
Diffstat (limited to 't/mda_filter_rubylang.t')
-rw-r--r-- | t/mda_filter_rubylang.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/mda_filter_rubylang.t b/t/mda_filter_rubylang.t index 5b6bf28b..754d52f7 100644 --- a/t/mda_filter_rubylang.t +++ b/t/mda_filter_rubylang.t @@ -48,10 +48,10 @@ EOF my $ibx = $config->lookup_name($v); # make sure all serials are searchable: - my ($tot, $msgs); for my $i (1..2) { - ($tot, $msgs) = $ibx->search->query("alerts:$i"); - is($tot, 1, "got one result for alerts:$i"); + my $mset = $ibx->search->mset("alerts:$i"); + is($mset->size, 1, "got one result for alerts:$i"); + my $msgs = $ibx->search->mset_to_smsg($ibx, $mset); is($msgs->[0]->{mid}, "a.$i\@b.com", "got expected MID for $i"); } is_deeply([], \@warn, 'no warnings'); |