aboutsummaryrefslogtreecommitdiff
path: root/t/tests/sietima/role/subscriberonly
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2016-06-21 16:45:55 +0100
committerdakkar <dakkar@thenautilus.net>2016-06-21 16:55:21 +0100
commit637013159f49e52f7464ea8e6173a9e236112410 (patch)
tree9685145635e51b0e1ab1a09b17fdbb02073eb051 /t/tests/sietima/role/subscriberonly
parentignore editor backup files (diff)
downloadSietima-637013159f49e52f7464ea8e6173a9e236112410.tar.gz
Sietima-637013159f49e52f7464ea8e6173a9e236112410.tar.bz2
Sietima-637013159f49e52f7464ea8e6173a9e236112410.zip
use the new deliveries comparator
Diffstat (limited to 't/tests/sietima/role/subscriberonly')
-rw-r--r--t/tests/sietima/role/subscriberonly/moderate.t42
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(