From 46742d95647c7a80cb2f60d5c134717dd91e22e2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 7 May 2020 21:05:50 +0000 Subject: replace most uses of PublicInbox::MIME with Eml PublicInbox::Eml has enough functionality to replace the Email::MIME-based PublicInbox::MIME. --- t/filter_rubylang.t | 8 ++++---- t/import.t | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 't') diff --git a/t/filter_rubylang.t b/t/filter_rubylang.t index 05e1b324..e6c53f98 100644 --- a/t/filter_rubylang.t +++ b/t/filter_rubylang.t @@ -3,7 +3,7 @@ use strict; use warnings; use Test::More; -use PublicInbox::MIME; +use PublicInbox::Eml; use PublicInbox::TestCommon; use_ok 'PublicInbox::Filter::RubyLang'; @@ -17,7 +17,7 @@ keep this Unsubscribe: EOF -my $mime = PublicInbox::MIME->new($msg); +my $mime = PublicInbox::Eml->new($msg); my $ret = $f->delivery($mime); is($ret, $mime, "delivery successful"); is($mime->body, "keep this\n", 'normal message filtered OK'); @@ -41,7 +41,7 @@ X-Mail-Count: 12 Message-ID: EOF - $mime = PublicInbox::MIME->new($msg); + $mime = PublicInbox::Eml->new($msg); $ret = $f->delivery($mime); is($ret, $mime, "delivery successful"); my $mm = PublicInbox::Msgmap->new($git_dir); @@ -53,7 +53,7 @@ Message-ID: EOF - $mime = PublicInbox::MIME->new($msg); + $mime = PublicInbox::Eml->new($msg); $ret = $f->delivery($mime); is($ret, 100, "delivery rejected without X-Mail-Count"); } diff --git a/t/import.t b/t/import.t index d2264102..ba4abd9c 100644 --- a/t/import.t +++ b/t/import.t @@ -75,7 +75,7 @@ $im->done; is(scalar @revs, 26, '26 revisions exist after mass import'); my ($mark, $msg) = $im->remove($mime); like($mark, qr/\A:\d+\z/, 'got mark'); -is(ref($msg), 'PublicInbox::MIME', 'got old message deleted'); +like(ref($msg), qr/\bPublicInbox::(?:Eml|MIME)\b/, 'got old message deleted'); is(undef, $im->remove($mime), 'remove is idempotent'); -- cgit v1.2.3-24-ge0c7