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
+++ 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", ''));