diff options
author | Eric Wong <e@80x24.org> | 2016-06-15 00:14:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-15 00:15:11 +0000 |
commit | 41aa4756879765d0c6d4d6e8754e0037b1a56fcc (patch) | |
tree | 7ef88a0a13a823858dcadc63a34f725c07d3781d /t | |
parent | 2646bc205fc04936801bd66e588ea340697a6fa8 (diff) | |
download | public-inbox-41aa4756879765d0c6d4d6e8754e0037b1a56fcc.tar.gz |
Email::Filter doesn't offer any functionality we need, here; and our dependency on Email::Filter will gradually be removed since it (and Email::LocalDelivery) seem abandoned and we can have more-fine-grained control by rolling our own Maildir delivery which can work transactionally.
Diffstat (limited to 't')
-rw-r--r-- | t/precheck.t | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/t/precheck.t b/t/precheck.t index 3f2c5d5b..6c353d8d 100644 --- a/t/precheck.t +++ b/t/precheck.t @@ -4,28 +4,25 @@ use strict; use warnings; use Test::More; use Email::Simple; -use Email::Filter; use PublicInbox::MDA; sub do_checks { my ($s) = @_; - my $f = Email::Filter->new(data => $s->as_string); - my $recipient = 'foo@example.com'; - ok(!PublicInbox::MDA->precheck($f, $recipient), + ok(!PublicInbox::MDA->precheck($s, $recipient), "wrong ORIGINAL_RECIPIENT rejected"); $recipient = 'b@example.com'; - ok(PublicInbox::MDA->precheck($f, $recipient), + ok(PublicInbox::MDA->precheck($s, $recipient), "ORIGINAL_RECIPIENT in To: is OK"); $recipient = 'c@example.com'; - ok(PublicInbox::MDA->precheck($f, $recipient), + ok(PublicInbox::MDA->precheck($s, $recipient), "ORIGINAL_RECIPIENT in Cc: is OK"); $recipient = [ 'c@example.com', 'd@example.com' ]; - ok(PublicInbox::MDA->precheck($f, $recipient), + ok(PublicInbox::MDA->precheck($s, $recipient), "alias list is OK"); } @@ -72,8 +69,7 @@ sub do_checks { ], body => "hello world\n", ); - my $f = Email::Filter->new(data => $s->as_string); - ok(!PublicInbox::MDA->precheck($f, $recipient), + ok(!PublicInbox::MDA->precheck($s, $recipient), "missing From: is rejected"); } |