Mercurial > hg > nginx-tests
changeset 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 | bc3351f157ef |
children | 74f276d0fca1 |
files | lib/Test/Nginx/SMTP.pm smtp.t |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Test/Nginx/SMTP.pm Mon Jan 12 06:08:05 2009 +0300 +++ b/lib/Test/Nginx/SMTP.pm Mon Jan 12 21:53:49 2009 +0300 @@ -67,6 +67,11 @@ Test::More->builder->like($self->read(), qr/^2\d\d /, @_); } +sub authok { + my $self = shift; + Test::More->builder->like($self->read(), qr/^235 /, @_); +} + ############################################################################### sub smtp_test_daemon {
--- a/smtp.t Mon Jan 12 06:08:05 2009 +0300 +++ b/smtp.t Mon Jan 12 21:53:49 2009 +0300 @@ -141,7 +141,7 @@ $s->send('AUTH LOGIN ' . encode_base64('test@example.com', '')); $s->check(qr/^334 UGFzc3dvcmQ6/, 'auth login with username password challenge'); $s->send(encode_base64('secret', '')); -$s->ok('auth login with username'); +$s->authok('auth login with username'); }