dmarc test: comments in the public list was
allowing certain org domain searches to fail (plus.google.com, b/c a google.com email address was in the public list). Now I anchor the searches to the start of the line. This test also catches edge cases like co.uk, which isn't listed, but a wildcard *.uk is.
This commit is contained in:
parent
3d6f23fcfd
commit
8823de5075
@ -12,7 +12,7 @@ my $test_email = 'matt@tnpi.net';
|
|||||||
sub register_tests {
|
sub register_tests {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
$self->register_test('test_get_organizational_domain', 2);
|
$self->register_test('test_get_organizational_domain', 3);
|
||||||
$self->register_test("test_fetch_dmarc_record", 3);
|
$self->register_test("test_fetch_dmarc_record", 3);
|
||||||
$self->register_test("test_discover_policy", 1);
|
$self->register_test("test_discover_policy", 1);
|
||||||
}
|
}
|
||||||
@ -55,7 +55,8 @@ sub test_get_organizational_domain {
|
|||||||
my $transaction = $self->qp->transaction;
|
my $transaction = $self->qp->transaction;
|
||||||
|
|
||||||
cmp_ok( $self->get_organizational_domain('test.www.tnpi.net'), 'eq', 'tnpi.net' );
|
cmp_ok( $self->get_organizational_domain('test.www.tnpi.net'), 'eq', 'tnpi.net' );
|
||||||
cmp_ok( $self->get_organizational_domain('www.example.co.uk'), 'eq', 'example.co.uk' )
|
cmp_ok( $self->get_organizational_domain('www.example.co.uk'), 'eq', 'example.co.uk' );
|
||||||
|
cmp_ok( $self->get_organizational_domain('plus.google.com'), 'eq', 'google.com' );
|
||||||
};
|
};
|
||||||
|
|
||||||
sub test_discover_policy {
|
sub test_discover_policy {
|
||||||
|
Loading…
Reference in New Issue
Block a user