diff options
Diffstat (limited to 't/tests/sietima/role/debounce.t')
-rw-r--r-- | t/tests/sietima/role/debounce.t | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/t/tests/sietima/role/debounce.t b/t/tests/sietima/role/debounce.t index 698cd36..903427b 100644 --- a/t/tests/sietima/role/debounce.t +++ b/t/tests/sietima/role/debounce.t @@ -13,33 +13,28 @@ my $s = make_sietima( ], ); -test_sending( - sietima => $s, -); - my $return_path = $s->return_path->address; -is( - [ transport->deliveries ], - array { - item hash { - field email => object { - call [cast=>'Email::MIME'] => object { - call [ header_str => 'X-Been-There' ] => - match qr{\b\Q$return_path\E\b}; - }; - }; - }; - }, - 'header should be added to all messages', -); +subtest 'header should be added' => sub { + test_sending( + sietima => $s, + mails => [ + object { + call [ header_str => 'X-Been-There' ] => + match qr{\b\Q$return_path\E\b}; + }, + ], + ); +}; -test_sending( - sietima => $s, - mail => { - headers => { 'x-been-there' => $return_path }, - }, - to => [], -); +subtest 'header should inhibit sending' => sub { + test_sending( + sietima => $s, + mail => { + headers => { 'x-been-there' => $return_path }, + }, + to => [], + ); +}; done_testing; |