]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/altid.t
www: rework query responses to avoid COUNT in SQLite
[public-inbox.git] / t / altid.t
index 0f3b86c12fee11f6780e5f0f378a15405450b909..d4f6152e302651e34825d2e65a6c6dde5da5eb6a 100644 (file)
--- a/t/altid.t
+++ b/t/altid.t
@@ -50,12 +50,11 @@ my $altid = [ "serial:gmane:file=$alt_file" ];
 
 {
        my $ro = PublicInbox::Search->new($git_dir, $altid);
-       my $res = $ro->query("gmane:1234");
-       is($res->{total}, 1, 'got one match');
-       is($res->{msgs}->[0]->mid, 'a@example.com');
+       my $msgs = $ro->query("gmane:1234");
+       is_deeply([map { $_->mid } @$msgs], ['a@example.com'], 'got one match');
 
-       $res = $ro->query("gmane:666");
-       is($res->{total}, 0, 'body did NOT match');
+       $msgs = $ro->query("gmane:666");
+       is_deeply([], $msgs, 'body did NOT match');
 };
 
 {