X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Ffilter_mirror.t;h=5bc7f3f406d8c29a0fdc50ef7ce2c45c35acc085;hb=0283273a14e1871955f6a9132f4f3f7884ec8a3f;hp=7cbe16046dfe2708866b1622db815db47d27abc3;hpb=3d41aa23f35501ca92aab8aa42980fa73f7fa74f;p=public-inbox.git diff --git a/t/filter_mirror.t b/t/filter_mirror.t index 7cbe1604..5bc7f3f4 100644 --- a/t/filter_mirror.t +++ b/t/filter_mirror.t @@ -1,40 +1,16 @@ -# Copyright (C) 2016-2018 all contributors +# Copyright (C) 2016-2020 all contributors # License: AGPL-3.0+ use strict; use warnings; use Test::More; -use Email::MIME; +use PublicInbox::TestCommon; use_ok 'PublicInbox::Filter::Mirror'; my $f = PublicInbox::Filter::Mirror->new; ok($f, 'created PublicInbox::Filter::Mirror object'); { - my $html_body = "hi"; - my $parts = [ - Email::MIME->create( - attributes => { - content_type => 'text/html; charset=UTF-8', - encoding => 'base64', - }, - body => $html_body, - ), - Email::MIME->create( - attributes => { - content_type => 'text/plain', - encoding => 'quoted-printable', - }, - body => 'hi = "bye"', - ) - ]; - my $email = Email::MIME->create( - header_str => [ - From => 'a@example.com', - Subject => 'blah', - 'Content-Type' => 'multipart/alternative' - ], - parts => $parts, - ); + my $email = eml_load 't/mda-mime.eml'; is($f->ACCEPT, $f->delivery($email), 'accept any trash that comes'); } -done_testing(); + done_testing();