[siesta-commit] siesta/t 07list.t,1.4,1.5

[prev] [thread] [next] [lurker] [Date index for 2002/08/23]

From: clampr
Subject: [siesta-commit] siesta/t 07list.t,1.4,1.5
Date: 10:05 on 23 Aug 2002
Update of /cvsroot/siesta/siesta/t
In directory usw-pr-cvs1:/tmp/cvs-serv28390

Modified Files:
	07list.t 
Log Message:
comment what the tests test


Index: 07list.t
===================================================================
RCS file: /cvsroot/siesta/siesta/t/07list.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- 07list.t	23 Aug 2002 08:33:28 -0000	1.4
+++ 07list.t	23 Aug 2002 09:05:04 -0000	1.5
@@ -7,22 +7,26 @@
 use Siesta::List;
 
 my $list = Siesta::List->new( 'dealers' );
-ok( $list );
-isa_ok( $list, "Siesta::List" );
+ok( $list, "list created" );
+isa_ok( $list, "Siesta::List", );
 is( $list->id, "dealers" );
 is( $list->owner,        'jay@xxxxxxxx.xxxxxxxxxx' );
 is( $list->post_address, 'dealers@xxxxxxxx.xxxxxxxxxx' );
 is( $list->return_path,  'dealers-bounce@xxxxxxxx.xxxxxxxxxx' );
-ok( $list->is_member('jay@xxxxxxxx.xxxxxxxxxx') );
-ok( !($list->is_member('silent_bob@xxxxxxxx.xxxxxxxxxx')) );
-my $user1 = Test::MockObject->new->mock( id  => sub { 'jay@xxxxxxxx.xxxxxxxxxx' } );
-ok( $list->is_member($user1) );
-my $user2 = Test::MockObject->new->mock( id  => sub { 'silent_bob@xxxxxxxx.xxxxxxxxxx' } );
-ok( !($list->is_member($user2)) );
+ok( $list->is_member('jay@xxxxxxxx.xxxxxxxxxx'), "jay is a member" );
+ok( !($list->is_member('silent_bob@xxxxxxxx.xxxxxxxxxx')),
+    'silent_bob@ is subscribed as bob@' );
 
-is (scalar($list->members()), 2);
+my $user1 = Test::MockObject->new
+  ->mock( id  => sub { 'jay@xxxxxxxx.xxxxxxxxxx' } );
+ok( $list->is_member($user1), "jay member (object)" );
+my $user2 = Test::MockObject->new
+  ->mock( id  => sub { 'silent_bob@xxxxxxxx.xxxxxxxxxx' } );
+ok( !($list->is_member($user2)), 'silent_bob@ bob@ object' );
+
+is (scalar($list->members()), 2, "only two members");
 my $flag = 1;
 foreach my $member ($list->members()) {
   $flag = $flag && $list->is_member($member);
 }
-ok ($flag);
+ok($flag, "->is_member agrees with ->members");



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52