Fix hook testing order

This exposes a bug with handling invalid return codes
This commit is contained in:
Jared Johnson 2015-02-03 16:15:16 -06:00
parent 262857b1cb
commit 7af1f770a5

View File

@ -156,7 +156,7 @@ sub __run_continuation {
}, },
); );
for my $t (@test_data) { for my $t (@test_data) {
for my $h ( @{ $t->{hooks} } ) { for my $h ( reverse @{ $t->{hooks} } ) {
$smtpd->fake_hook( 'helo', sub { return @$h } ); $smtpd->fake_hook( 'helo', sub { return @$h } );
} }
$smtpd->{_continuation} = [ 'helo', ['somearg'], @{ $smtpd->hooks->{helo} } ]; $smtpd->{_continuation} = [ 'helo', ['somearg'], @{ $smtpd->hooks->{helo} } ];