From 95d40297cfddce102e65077ff2d358de7b9444d0 Mon Sep 17 00:00:00 2001 From: Jared Johnson Date: Thu, 12 Feb 2015 15:53:50 -0600 Subject: [PATCH] Use a fake greeting for testing run_continuation() This makes the test more universally useful in exercising run_continuation() itself even with forks that e.g. use custom greetings --- t/qpsmtpd.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/qpsmtpd.t b/t/qpsmtpd.t index 0db5ce5..d2520e8 100644 --- a/t/qpsmtpd.t +++ b/t/qpsmtpd.t @@ -111,11 +111,13 @@ sub __run_continuation { my @local_hooks = @{ $smtpd->hooks->{connect} }; $smtpd->{_continuation} = ['connect', [DECLINED, "test mess"], @local_hooks]; + $smtpd->fake_config( 'smtpgreeting', 'Hello there ESMTP' ); eval { $r = $smtpd->run_continuation }; ok(!$@, "run_continuation with a continuation doesn't throw exception"); is($r->[0], 220, "hook_responder, code"); - ok($r->[1] =~ /ESMTP qpsmtpd/, "hook_responder, message: ". $r->[1]); + is($r->[1], 'Hello there ESMTP', "hook_responder, message"); + $smtpd->unfake_config; my @test_data = ( {