Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a fake greeting for testing run_continuation() #231

Merged
merged 1 commit into from
Feb 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion t/qpsmtpd.t
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
{
Expand Down