qpsmtpd/t/plugin_tests/rcpt_ok

23 lines
638 B
Plaintext
Raw Normal View History

sub register_tests {
my $self = shift;
$self->register_test("test_returnval", 2);
2010-07-02 22:42:08 +02:00
$self->register_test("rcpt_ok", 1);
}
sub test_returnval {
my $self = shift;
my $address = Qpsmtpd::Address->parse('<me@example.com>');
my ($ret, $note) = $self->hook_rcpt($self->qp->transaction, $address);
is($ret, DENY, "Check we got a DENY");
print("# rcpt_ok result: $note\n");
$address = Qpsmtpd::Address->parse('<me@localhost>');
($ret, $note) = $self->hook_rcpt($self->qp->transaction, $address);
is($ret, OK, "Check we got a OK");
# print("# rcpt_ok result: $note\n");
}
2010-07-02 22:42:08 +02:00
sub rcpt_ok {
ok(1);
}