diff --git a/t/plugin_tests/rcpt_ok b/t/plugin_tests/rcpt_ok index a7fad27..3faaf0c 100644 --- a/t/plugin_tests/rcpt_ok +++ b/t/plugin_tests/rcpt_ok @@ -22,15 +22,15 @@ sub test_hook_rcpt { my $address = Qpsmtpd::Address->parse(''); my ($r, $mess) = $self->hook_rcpt( $transaction, $address ); - cmp_ok( $r, '==', OK, "hook_rcpt, localhost"); + cmp_ok( $r, '==', OK, "localhost"); $address = Qpsmtpd::Address->parse(''); ($r, $mess) = $self->hook_rcpt( $transaction, $address ); - cmp_ok( $r, '==', DENY, "hook_rcpt, example.com"); + cmp_ok( $r, '==', DENY, "example.com"); $self->qp->connection->relay_client(1); ($r, $mess) = $self->hook_rcpt( $transaction, $address ); - cmp_ok( $r, '==', OK, "hook_rcpt, example.com"); + cmp_ok( $r, '==', OK, "example.com"); $self->qp->connection->relay_client(0); }; @@ -57,48 +57,45 @@ sub test_is_in_morercpthosts { my $ref = $self->qp->config('morercpthosts', 'map'); my ($domain) = keys %$ref; if ( $domain ) { - ok( $self->is_in_morercpthosts( $domain ), "is_in_morercpthosts, $domain"); + ok( $self->is_in_morercpthosts( $domain ), "$domain"); } else { ok(1, "is_in_morercpthosts (skip, no entries)" ); }; - ok( ! $self->is_in_morercpthosts( 'example.com' ), "is_in_morercpthosts -"); + ok( ! $self->is_in_morercpthosts( 'example.com' ), "missing -"); }; sub test_get_rcpt_host { my $self = shift; my $address = Qpsmtpd::Address->parse(''); - cmp_ok( $self->get_rcpt_host( $address ), 'eq', 'example.com', - "get_rcpt_host, +" ); + cmp_ok( $self->get_rcpt_host( $address ), 'eq', 'example.com', "+" ); $address = Qpsmtpd::Address->parse(''); - cmp_ok( $self->get_rcpt_host( $address ), 'eq', 'example.com', - "get_rcpt_host, +" ); + cmp_ok( $self->get_rcpt_host( $address ), 'eq', 'example.com', "+" ); $address = Qpsmtpd::Address->parse(''); - cmp_ok( $self->get_rcpt_host( $address ), 'eq', 'example.com', - "get_rcpt_host, +" ); + cmp_ok( $self->get_rcpt_host( $address ), 'eq', 'example.com', "+" ); $address = Qpsmtpd::Address->parse(''); my $local_hostname = $self->get_rcpt_host( $address ); if ( $local_hostname eq 'some.host.example.org' ) { cmp_ok( $self->get_rcpt_host( $address ), 'eq', 'some.host.example.org', - "get_rcpt_host, special postmaster +" ); + "special postmaster +" ); } else { - ok( 1, "get_rcpt_host, special postmaster + ($local_hostname)" ); + ok( 1, "special postmaster + ($local_hostname)" ); } # I think this is a bug. Qpsmtpd::Address fails to parse $address = Qpsmtpd::Address->parse(''); - ok( ! $self->get_rcpt_host( $address ), "get_rcpt_host, missing host" ); + ok( ! $self->get_rcpt_host( $address ), "missing host" ); $address = Qpsmtpd::Address->parse('<>'); - ok( ! $self->get_rcpt_host( $address ), "get_rcpt_host, null recipient" ); + ok( ! $self->get_rcpt_host( $address ), "null recipient" ); $address = Qpsmtpd::Address->parse('<@example.com>'); - ok( ! $self->get_rcpt_host( $address ), "get_rcpt_host, missing user" ); + ok( ! $self->get_rcpt_host( $address ), "missing user" ); };