leave_list_your_not_in.t (583B)
1 use strict; 2 use Test; 3 use SL::Test; 4 5 BEGIN { plan tests => 8 } 6 7 # Send a leave_list message that contains a valid list id but the requesting 8 # device is not currently a member of. 9 my $s = SL::Test::Server->new(); 10 11 my $A = SL::Test::Client->new(); 12 my $B = SL::Test::Client->new(); 13 14 my $list = $A->list_add({ name => 'only a can see this list', date => 0 }); 15 16 # Who knows how B got this list id, but he did 17 my $err = $B->list_leave($list->{num}, 'err'); 18 ok($err, 'the client was not a member of the list'); 19 ok($s->readline(), '/tried to leave a list the user was not in for device/');