Mercurial > prosody-modules
view mod_lib_ldap/dev/t/00-login.t @ 811:e2d940d81613
mod_smacks: Only request ack for stanzas
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 10 Sep 2012 21:11:04 +0200 |
parents | 1d51c5e38faa |
children | 8495dae58d78 |
line wrap: on
line source
use strict; use warnings; use lib 't'; use TestConnection; use Test::More; my @users = ( 'one', 'two', 'three', 'four', 'five', ); plan tests => scalar(@users) + 2; foreach my $username (@users) { my $conn = TestConnection->new($username); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok(! $error) or diag($error); } do { my $conn = TestConnection->new('one', password => '23451'); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok($error); }; do { my $conn = TestConnection->new('six', password => '12345'); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok($error); };