Mercurial > hg > nginx-tests
changeset 151:1c39b7edc593
Tests: make sure imap authenticate without arguments fails.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 25 Apr 2011 04:40:38 +0400 |
parents | 6b73d6c8f26c |
children | c9be30f65be7 |
files | mail_imap.t |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mail_imap.t Fri Apr 08 21:23:40 2011 +0400 +++ b/mail_imap.t Mon Apr 25 04:40:38 2011 +0400 @@ -29,7 +29,7 @@ local $SIG{PIPE} = 'IGNORE'; my $t = Test::Nginx->new() - ->has(qw/mail imap http rewrite/)->plan(8) + ->has(qw/mail imap http rewrite/)->plan(9) ->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon) ->write_file_expand('nginx.conf', <<'EOF')->run(); @@ -86,6 +86,11 @@ my $s = Test::Nginx::IMAP->new(); $s->ok('greeting'); +# bad auth + +$s->send('1 AUTHENTICATE'); +$s->check(qr/^\S+ BAD/, 'auth without arguments'); + # auth plain $s->send('1 AUTHENTICATE PLAIN ' . encode_base64("\0test\@example.com\0bad", ''));