about summary refs log tree commit homepage
path: root/t/v2writable.t
diff options
authorEric Wong <e@yhbt.net>2020-06-01 10:06:56 +0000
committerEric Wong <e@yhbt.net>2020-06-03 04:04:21 +0000
commit62b80b61d334361677e26e9ddb966e6bc5f8635d (patch)
treef10d0e4e7a0b7a1319535907581abae951e2183d /t/v2writable.t
parentdee9a7231ca1019f56eea3596f0c428769e3eac1 (diff)
We'll continue to favor simpler data models that can be
used directly rather than wasting time and memory with
accessor APIs.

The ->from, ->to, -cc, ->mid, ->subject, >references methods can
all be trivially replaced by hash lookups since all their values
are stored in doc_data.  Most remaining callers of those methods
were test cases, anyways.

->from_name is only used in the PSGI code, so we can just
use ->psgi_cull to take care of populating the {from_name}
Diffstat (limited to 't/v2writable.t')
1 files changed, 3 insertions, 2 deletions
diff --git a/t/v2writable.t b/t/v2writable.t
index fa5c786e..2bd7a400 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -224,12 +224,13 @@ EOF
         like($tip, qr/\A[a-f0-9]+ test removal\n\z/s,
                 'commit message propagated to git');
         is_deeply(\@after, \@before, 'only one commit written to git');
-        is($ibx->mm->num_for($smsg->mid), undef, 'no longer in Msgmap by mid');
+        my $mid = $smsg->{mid};
+        is($ibx->mm->num_for($mid), undef, 'no longer in Msgmap by mid');
         my $num = $smsg->{num};
         like($num, qr/\A\d+\z/, 'numeric number in return message');
         is($ibx->mm->mid_for($num), undef, 'no longer in Msgmap by num');
         my $srch = $ibx->search->reopen;
-        my $mset = $srch->query('m:'.$smsg->mid, { mset => 1});
+        my $mset = $srch->query('m:'.$mid, { mset => 1});
         is($mset->size, 0, 'no longer found in Xapian');
         my @log1 = (@log, qw(-1 --pretty=raw --raw -r --no-renames));
         is($srch->{over_ro}->get_art($num), undef,