about summary refs log tree commit homepage
path: root/t/precheck.t
diff options
context:
space:
mode:
Diffstat (limited to 't/precheck.t')
-rw-r--r--t/precheck.t14
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");
 }