From 8823de50751da52942593df0c1e347be3d902fb9 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 24 Apr 2013 16:33:57 -0400 Subject: [PATCH] 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. --- t/plugin_tests/dmarc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/plugin_tests/dmarc b/t/plugin_tests/dmarc index 4c8ef1c..461db72 100644 --- a/t/plugin_tests/dmarc +++ b/t/plugin_tests/dmarc @@ -12,7 +12,7 @@ my $test_email = 'matt@tnpi.net'; sub register_tests { 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_discover_policy", 1); } @@ -55,7 +55,8 @@ sub test_get_organizational_domain { my $transaction = $self->qp->transaction; 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 {