about summary refs log tree commit homepage
path: root/t/search.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-04-25 05:52:21 +0000
committerEric Wong <e@yhbt.net>2020-04-26 07:03:12 +0000
commit5d8dbb4aca5afcc6b98a4d951f03003fb7eaf356 (patch)
treeb26c754dd2822193f4fb6e96e8cad8e660cbf246 /t/search.t
parent58852a50f6a72265cce1e4729aae3875bba5aa96 (diff)
downloadpublic-inbox-5d8dbb4aca5afcc6b98a4d951f03003fb7eaf356.tar.gz
We'll use this to create, memoize, and reuse .eml files.  This
will be used to reduce (and eventually eliminate) our dependency
on Email::MIME in tests.
Diffstat (limited to 't/search.t')
-rw-r--r--t/search.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/search.t b/t/search.t
index 0fd5fdee..0301fd90 100644
--- a/t/search.t
+++ b/t/search.t
@@ -371,6 +371,7 @@ $ibx->with_umask(sub {
 }
 
 $ibx->with_umask(sub {
+        my $amsg = mime_load 't/search-amsg.eml', sub {
         my $part1 = Email::MIME->create(
                  attributes => {
                      content_type => 'text/plain',
@@ -391,7 +392,7 @@ $ibx->with_umask(sub {
                  },
                  body_str => 'inside another',
         );
-        my $amsg = Email::MIME->create(
+        Email::MIME->create(
                 header_str => [
                         Subject => 'see attachment',
                         'Message-ID' => '<file@attached>',
@@ -399,7 +400,8 @@ $ibx->with_umask(sub {
                         To => 'list@example.com',
                 ],
                 parts => [ $part1, $part2 ],
-        );
+        )}; # mime_load sub
+
         ok($rw->add_message($amsg), 'added attachment');
         $rw_commit->();
         $ro->reopen;