Mercurial > hg > nginx-tests
comparison lib/Test/Nginx/SMTP.pm @ 60:11e33ba0656a
Tests: check for 235 code on successful smtp auth.
For now, convert only check for auth login with username test since it's
already marked as TODO.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 12 Jan 2009 21:53:49 +0300 |
parents | b5b4271554b0 |
children | 5f56040c39df |
comparison
equal
deleted
inserted
replaced
59:bc3351f157ef | 60:11e33ba0656a |
---|---|
65 sub ok { | 65 sub ok { |
66 my $self = shift; | 66 my $self = shift; |
67 Test::More->builder->like($self->read(), qr/^2\d\d /, @_); | 67 Test::More->builder->like($self->read(), qr/^2\d\d /, @_); |
68 } | 68 } |
69 | 69 |
70 sub authok { | |
71 my $self = shift; | |
72 Test::More->builder->like($self->read(), qr/^235 /, @_); | |
73 } | |
74 | |
70 ############################################################################### | 75 ############################################################################### |
71 | 76 |
72 sub smtp_test_daemon { | 77 sub smtp_test_daemon { |
73 my $server = IO::Socket::INET->new( | 78 my $server = IO::Socket::INET->new( |
74 Proto => 'tcp', | 79 Proto => 'tcp', |