diff options
Diffstat (limited to 't/tests/sietima/role/subscriberonly/moderate.t')
-rw-r--r-- | t/tests/sietima/role/subscriberonly/moderate.t | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/t/tests/sietima/role/subscriberonly/moderate.t b/t/tests/sietima/role/subscriberonly/moderate.t index 6564b13..b76a01a 100644 --- a/t/tests/sietima/role/subscriberonly/moderate.t +++ b/t/tests/sietima/role/subscriberonly/moderate.t @@ -37,34 +37,22 @@ subtest 'from non-subscriber' => sub { test_sending( sietima => $s, mail => { from=>'someone@users.example.com' }, - to => [$admin], - ); - - - my @deliveries = transport->deliveries; - is( - \@deliveries, - [ - hash { - field email => object { - call [cast=>'Email::MIME'] => object { - call [header_str => 'subject'] => match qr{\bheld for moderation\b}; - call_list parts => [ - object { - call body => match qr{Use id \S+ to refer to it}; - }, - object { - call sub {Email::MIME->new(shift->body)} => object { - call [header_str => 'subject'] => 'Test Message'; - }; - }, - ]; - }; - }; + mails => [{ + o => object { + call [header_str => 'subject'] => match qr{\bheld for moderation\b}; + call_list parts => [ + object { + call body => match qr{Use id \S+ to refer to it}; + }, + object { + call sub {Email::MIME->new(shift->body)} => object { + call [header_str => 'subject'] => 'Test Message'; + }; + }, + ]; }, - ], - 'the original mail should be attached', - np @deliveries, + to => [$admin], + }], ); is( |