# HG changeset patch # User Maxim Dounin # Date 1303692038 -14400 # Node ID 1c39b7edc59329ecb26a52c613f3389887da3034 # Parent 6b73d6c8f26c13d93f1806a83f1ebebf8acb8be5 Tests: make sure imap authenticate without arguments fails. diff --git a/mail_imap.t b/mail_imap.t --- a/mail_imap.t +++ b/mail_imap.t @@ -29,7 +29,7 @@ select STDOUT; $| = 1; 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 @@ EOF 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", ''));