Skip to content
Browse files

Tests: make sure imap authenticate without arguments fails.

  • Loading branch information...
1 parent e17ce7e commit 7f26c5f7e84d7506132c60d9f9f7d55802f0a4ea @mdounin mdounin committed Apr 25, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 mail_imap.t
View
7 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", ''));

0 comments on commit 7f26c5f

Please sign in to comment.
Something went wrong with that request. Please try again.