other_lists_filter_my_lists.t (734B)
1 use strict; 2 use Test; 3 use SL::Test; 4 5 BEGIN { plan tests => 11 } 6 7 # Check that when your mutual friends are in your own lists that you don't get 8 # your own lists back when doing a lists_get_other request 9 my $server = SL::Test::Server->new(); 10 11 # Create A and B 12 my $A = SL::Test::Client->new(); 13 my $B = SL::Test::Client->new(); 14 15 # B adds a new list 16 $B->list_add({ name => 'bs new list', date => 0 }); 17 18 # A and B become mutual friends 19 $A->friend_add($B->phnum()); 20 $B->friend_add($A->phnum()); 21 22 # A adds a new list, B joins A's new list 23 my $list = $A->list_add({ name => 'as new list', date => 0 }); 24 $B->list_join($list->{num}); 25 26 # A should only see B's list that it never joined 27 my $other = $A->lists_get_other(); 28 ok(scalar(@$other), 1);