]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/nntpd-tls.t
tests: replace mime_from_path with mime_load
[public-inbox.git] / t / nntpd-tls.t
index c97d179daf9d4fb13c4331b55e3b160342831cbb..0ad29be0b82ea4c3e4826c83001533a7d527b271 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -63,11 +63,7 @@ EOF
 
 {
        my $im = $ibx->importer(0);
-       my $mime = PublicInbox::MIME->new(do {
-               open my $fh, '<', 't/data/0001.patch' or die;
-               local $/;
-               <$fh>
-       });
+       my $mime = mime_load 't/data/0001.patch';
        ok($im->add($mime), 'message added');
        $im->done;
        if ($version == 1) {