aboutsummaryrefslogtreecommitdiff
path: root/t/tests/sietima/role/debounce.t
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/debounce.t
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/debounce.t')
-rw-r--r--t/tests/sietima/role/debounce.t45
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;