]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/mda_filter_rubylang.t
No ext_urls
[public-inbox.git] / t / mda_filter_rubylang.t
index 5b6bf28b862737542cc128635b44f82a5ec9502a..d05eec258ecb23587cf78f733a2c61a67e7b26bb 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -44,14 +44,14 @@ something
 EOF
                ok(run_script(['-mda'], $env, $opt), 'message delivered');
        }
-       my $config = PublicInbox::Config->new;
-       my $ibx = $config->lookup_name($v);
+       my $cfg = PublicInbox::Config->new;
+       my $ibx = $cfg->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');