about summary refs log tree commit homepage
path: root/t/psgi_v2.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/psgi_v2.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/psgi_v2.t')
-rw-r--r--t/psgi_v2.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/psgi_v2.t b/t/psgi_v2.t
index bc26a112..5d212ca6 100644
--- a/t/psgi_v2.t
+++ b/t/psgi_v2.t
@@ -225,6 +225,7 @@ test_psgi(sub { $www->call(@_) }, sub {
 
         # ensure conflicted attachments can be resolved
         foreach my $body (qw(old new)) {
+                $mime = mime_load "t/psgi_v2-$body.eml", sub {
                 my $parts = [
                         Email::MIME->create(
                                 attributes => { content_type => 'text/plain' },
@@ -238,12 +239,12 @@ test_psgi(sub { $www->call(@_) }, sub {
                                 body => $body
                         )
                 ];
-                $mime = Email::MIME->create(
+                Email::MIME->create(
                         parts => $parts,
                         header_str => [ From => 'root@z',
                                 'Message-ID' => '<a@dup>',
                                 Subject => 'hi']
-                );
+                )}; # mime_load sub
                 ok($im->add($mime), "added attachment $body");
         }
         $im->done;