about summary refs log tree commit homepage
path: root/t/psgi_attach.t
diff options
context:
space:
mode:
Diffstat (limited to 't/psgi_attach.t')
-rw-r--r--t/psgi_attach.t9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/psgi_attach.t b/t/psgi_attach.t
index 12f9e6ee..c6f8072f 100644
--- a/t/psgi_attach.t
+++ b/t/psgi_attach.t
@@ -75,6 +75,9 @@ $im->init_bare;
                 $res = $cb->(GET("/test/$mid/"));
                 like($res->content, qr/\bhref="2-embed2x\.eml"/s,
                         'href to message/rfc822 attachment visible');
+                like($res->content, qr/\bhref="2\.1\.2-test\.eml"/s,
+                        'href to nested message/rfc822 attachment visible');
+
                 $res = $cb->(GET("/test/$mid/2-embed2x.eml"));
                 my $eml = PublicInbox::Eml->new(\($res->content));
                 is_deeply([ $eml->header_raw('Message-ID') ], [ "<$irt>" ],
@@ -85,6 +88,12 @@ $im->init_bare;
                         '1st attachment is as expected');
                 is($subs[1]->header('Content-Type'), 'message/rfc822',
                         '2nd attachment is as expected');
+
+                $res = $cb->(GET("/test/$mid/2.1.2-test.eml"));
+                $eml = PublicInbox::Eml->new(\($res->content));
+                is_deeply([ $eml->header_raw('Message-ID') ],
+                        [ '<20200418214114.7575-1-e@yhbt.net>' ],
+                        'nested eml retrieved');
         });
 }
 done_testing();