shlist

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

update_list_youre_not_in.t (567B)


      1 use strict;
      2 use Test;
      3 use SL::Test;
      4 
      5 BEGIN { plan tests => 8 }
      6 
      7 my $s = SL::Test::Server->new();
      8 
      9 # Create A and B
     10 my $A = SL::Test::Client->new();
     11 my $B = SL::Test::Client->new();
     12 
     13 # A adds a new list
     14 my $list = $A->list_add({ name => 'this is a new list for a', date => 0 });
     15 
     16 # B tries to update A's list without joining it first
     17 my $request = { num => $list->{num}, name => 'some new name', date => 1 };
     18 my $err = $B->list_update($request, 'err');
     19 ok($err, 'client tried to update a list it was not in');
     20 ok($s->readline(), '/device \'.*\' not in list \'.*\'/');