commit d2f36e882f93beccc44b029f22b3bace1507598c
parent c1f57d79a8ab3b8d6d2d4d0dd642b0139dbe9676
Author: kyle <kyle@getaddrinfo.net>
Date: Sat, 27 Feb 2016 21:51:15 -0700
server: add new test for list_update notifications
Diffstat:
1 file changed, 25 insertions(+), 0 deletions(-)
diff --git a/server/t/list_update_notify.t b/server/t/list_update_notify.t
@@ -0,0 +1,25 @@
+use strict;
+use Test;
+use SL::Test;
+
+BEGIN { plan tests => 14 }
+
+my $s = SL::Test::Server->new();
+my $n = SL::Test::Notify->new();
+
+my $A = SL::Test::Client->new();
+my $B = SL::Test::Client->new();
+my $C = SL::Test::Client->new();
+
+my $list = $A->list_add({ name => 'this is a new list', date => 0 });
+
+$A->friend_add($B->phnum());
+$B->friend_add($A->phnum());
+
+$C->list_join($list->{num});
+
+$A->list_update({ num => $list->{num}, name => 'this is an updated name' });
+
+ok($n->readline(), "/message type 'updated_list'/");
+ok($n->readline(), "/sending to 'token_.*' os 'unix'/");
+ok($n->readline(), "/sending to 'token_.*' os 'unix'/");