shlist

share and manage lists between multiple people
Log | Files | Refs

commit 0464cd261776547efb7b0f84dd547406e2b1c6c8
parent 63b929e0d6648206b2284f28762aec2e3452376c
Author: kyle <kyle@0x30.net>
Date:   Sat, 16 Jan 2016 10:32:58 -0700

tests: add new test get_other_lists_filters_my_lists

Diffstat:
Aserver/tests/get_other_lists_filters_my_lists/Makefile | 3+++
Aserver/tests/get_other_lists_filters_my_lists/server.log.good | 27+++++++++++++++++++++++++++
Aserver/tests/get_other_lists_filters_my_lists/test.pl | 27+++++++++++++++++++++++++++
3 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/server/tests/get_other_lists_filters_my_lists/Makefile b/server/tests/get_other_lists_filters_my_lists/Makefile @@ -0,0 +1,3 @@ +DIFF_MOD=sort + +include ../test.mk diff --git a/server/tests/get_other_lists_filters_my_lists/server.log.good b/server/tests/get_other_lists_filters_my_lists/server.log.good @@ -0,0 +1,27 @@ +device_add: success, <digits>:<base64> os <base64> +device_add: success, <digits>:<base64> os <base64> +disconnected! +disconnected! +friend_add: <base64> adding <digits> +friend_add: <base64> adding <digits> +friend_add: added friend is a member +friend_add: added friend is a member +friend_add: found mutual friendship +friend_add: friends device id is <base64> +friend_add: friends device id is <base64> +list_add: device <base64> +list_add: device <base64> +list_add: new list name <string> +list_add: new list name <string> +list_add: new list number is <digits> +list_add: new list number is <digits> +list_join: device <base64> +list_join: device <base64> has been added to list <digits> +list_join: list <digits> +lists_get_other: found list <string> +lists_get_other: found mutual friend <digits> +lists_get_other: gathering lists for <base64> +new connection (pid = <digits>) +new connection (pid = <digits>) +ssl ok, ver = 'TLSv1_2' cipher = 'ECDHE-RSA-AES128-SHA256' +ssl ok, ver = 'TLSv1_2' cipher = 'ECDHE-RSA-AES128-SHA256' diff --git a/server/tests/get_other_lists_filters_my_lists/test.pl b/server/tests/get_other_lists_filters_my_lists/test.pl @@ -0,0 +1,27 @@ +#!/usr/bin/perl -I../ +use strict; +use warnings; +use client; +use test; + +# Check that when your mutual friends are in your own lists that you don't get +# your own lists back when doing a lists_get_other request + +# Create A and B +my $A = client->new(); +my $B = client->new(); + +# B adds a new list +$B->list_add('bs new list'); + +# A and B become mutual friends +$A->friend_add($B->phnum()); +$B->friend_add($A->phnum()); + +# A adds a new list, B joins A's new list +$A->list_add('as new list'); +$B->list_join($A->lists(0)->{'id'}); + +# A should only see B's list that it never joined +my @other = $A->lists_get_other(); +fail_num_ne 'wrong number of other lists ', scalar(@other), 1;