diff options
Diffstat (limited to 't/tests')
-rw-r--r-- | t/tests/sietima/role/nospoof.t | 18 | ||||
-rw-r--r-- | t/tests/sietima/role/nospoof/dmarc.t | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/t/tests/sietima/role/nospoof.t b/t/tests/sietima/role/nospoof.t index 6f30635..b0ec622 100644 --- a/t/tests/sietima/role/nospoof.t +++ b/t/tests/sietima/role/nospoof.t @@ -10,6 +10,10 @@ my $s = make_sietima( ], ); +my $return_path = $s->return_path; +my $return_path_address = $return_path->address; +my $return_path_host = $return_path->host; + test_sending( sietima => $s, mail => { @@ -17,7 +21,19 @@ test_sending( }, mails => [ object { - call [ header_str => 'from' ] => '"a user" <'.$s->return_path->address.'>'; + call [ header_str => 'from' ] => qq{"a user" <$return_path_address>}; + }, + ], +); + +test_sending( + sietima => $s, + mail => { + from => qq{a user <one\@$return_path_host>}, + }, + mails => [ + object { + call [ header_str => 'from' ] => qq{"a user" <one\@$return_path_host>}; }, ], ); diff --git a/t/tests/sietima/role/nospoof/dmarc.t b/t/tests/sietima/role/nospoof/dmarc.t index ddbd76a..620268b 100644 --- a/t/tests/sietima/role/nospoof/dmarc.t +++ b/t/tests/sietima/role/nospoof/dmarc.t @@ -64,4 +64,6 @@ test_rewriting 'foo@sub.q-q-pol.com'; test_no_rewriting 'foo@example.com'; +test_no_rewriting 'foo@' . $s->post_address->host; + done_testing; |