From ef622a88e67677d4d07d057dc6437d567729e66a Mon Sep 17 00:00:00 2001 From: dakkar Date: Wed, 4 Jan 2017 16:48:06 +0000 Subject: fix testing when no recipients specified --- t/lib/Test/Sietima.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/lib/Test/Sietima.pm b/t/lib/Test/Sietima.pm index a94a51c..1c51def 100644 --- a/t/lib/Test/Sietima.pm +++ b/t/lib/Test/Sietima.pm @@ -85,7 +85,7 @@ sub deliveries_are (%args) { field envelope => hash { field to => bag { item $_ for $m->{to}->@*; - }; + } if $m->{to}; field from => $m->{from} if $m->{from}; etc(); }; @@ -101,7 +101,7 @@ sub deliveries_are (%args) { end(); }; } - elsif (my @recipients = do {my $to = $args{to}; ref($to) ? $to->@* : $to }) { + elsif (my @recipients = do {my $to = $args{to}; ref($to) ? $to->@* : $to // () }) { $checker = array { item hash { field envelope => hash { -- cgit v1.2.3