From 7af1f770a57a17357edfc5c9e4d1662370c9b128 Mon Sep 17 00:00:00 2001 From: Jared Johnson Date: Tue, 3 Feb 2015 16:15:16 -0600 Subject: [PATCH] Fix hook testing order This exposes a bug with handling invalid return codes --- t/qpsmtpd.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/qpsmtpd.t b/t/qpsmtpd.t index e6b50bb..1db8647 100644 --- a/t/qpsmtpd.t +++ b/t/qpsmtpd.t @@ -156,7 +156,7 @@ sub __run_continuation { }, ); for my $t (@test_data) { - for my $h ( @{ $t->{hooks} } ) { + for my $h ( reverse @{ $t->{hooks} } ) { $smtpd->fake_hook( 'helo', sub { return @$h } ); } $smtpd->{_continuation} = [ 'helo', ['somearg'], @{ $smtpd->hooks->{helo} } ];