[siesta-commit] siesta/t 10plugin_replyto.t,1.4,1.5 10plugin_simplesig.t,1.7,1.8 10plugin_subscribe.t,1.10,1.11 08config.t,1.15,NONE

[prev] [thread] [next] [lurker] [Date index for 2003/03/16]

From: clampr
Subject: [siesta-commit] siesta/t 10plugin_replyto.t,1.4,1.5 10plugin_simplesig.t,1.7,1.8 10plugin_subscribe.t,1.10,1.11 08config.t,1.15,NONE
Date: 13:10 on 16 Mar 2003
Update of /cvsroot/siesta/siesta/t
In directory sc8-pr-cvs1:/tmp/cvs-serv23708/t

Modified Files:
	10plugin_replyto.t 10plugin_simplesig.t 10plugin_subscribe.t 
Removed Files:
	08config.t 
Log Message:
refactor the prefs system like billyo

Index: 10plugin_replyto.t
===================================================================
RCS file: /cvsroot/siesta/siesta/t/10plugin_replyto.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- 10plugin_replyto.t	12 Sep 2002 12:55:32 -0000	1.4
+++ 10plugin_replyto.t	16 Mar 2003 13:10:37 -0000	1.5
@@ -10,10 +10,13 @@
 my $plugin       = Siesta::Plugin::ReplyTo->new;
 my $POST_ADDRESS = 'foo@xxx.xxx';
 
+use Data::Dumper;
 my $mail = Siesta::Message->new();
-my $list = Test::MockObject->new();
-$list->mock( post_address => sub { $POST_ADDRESS } );
-$list->mock( id           => sub { 'test' } );
+my $list = Test::MockObject
+  ->new
+  ->mock( post_address => sub { $POST_ADDRESS } )
+  ->mock( id           => sub { 'test' } )
+  ->mock( pref         => sub { $_[2] eq 'munge' }); # yes, please do munge
 
 $mail->list($list);
 $mail->user(undef);

Index: 10plugin_simplesig.t
===================================================================
RCS file: /cvsroot/siesta/siesta/t/10plugin_simplesig.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- 10plugin_simplesig.t	15 Mar 2003 20:15:56 -0000	1.7
+++ 10plugin_simplesig.t	16 Mar 2003 13:10:37 -0000	1.8
@@ -26,14 +26,18 @@
 
 my $reply;
 
-my $list =
-  Test::MockObject->new->mock( owner => sub { "Daddy" } )
-  ->mock( id                         => sub { 'test' } );
+my $list = Test::MockObject
+  ->new
+  ->mock( owner => sub { "Daddy" } )
+  ->mock( id    => sub { 'test' } )
+  ->mock( pref  => sub { return 5 if $_[2] eq "maxlines" } );
 
-my $mail =
-  Test::MockObject->new->mock( body => sub { [@mail] } )
-  ->mock( reply => sub { $reply = join '', @_ } )->mock( list => sub { $list } )
-  ->mock( user => sub { undef } );
+my $mail = Test::MockObject
+  ->new
+  ->mock( body  => sub { [@mail] } )
+  ->mock( reply => sub { $reply = join '', @_ } )
+  ->mock( list  => sub { $list } )
+  ->mock( user  => sub { undef } );
 
 my $plugin = new Siesta::Plugin::SimpleSig;
 

Index: 10plugin_subscribe.t
===================================================================
RCS file: /cvsroot/siesta/siesta/t/10plugin_subscribe.t,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- 10plugin_subscribe.t	15 Mar 2003 20:15:57 -0000	1.10
+++ 10plugin_subscribe.t	16 Mar 2003 13:10:37 -0000	1.11
@@ -8,11 +8,13 @@
 Siesta->connect( DBI => "dbi:SQLite:t/test.db" );
 
 my $plugin = Siesta::Plugin::Subscribe->new;
-my $list   =
-  Test::MockObject->new->mock( name => sub { 'escapees' } )
+my $list   = Test::MockObject
+  ->new
+  ->mock( name       => sub { 'escapees' } )
   ->mock( owner      => sub { 'houdini@elsewhere' } )
   ->mock( add_member => sub { $_[1]->email eq 'suzanne@lab' } )
-  ->mock( is_member => sub { $_[1] eq 'houdini@elsewhere' } );
+  ->mock( pref       => sub { return 0 if $_[2] eq 'confirm' } )
+  ->mock( is_member  => sub { $_[1] eq 'houdini@elsewhere' } );
 
 my $reply;
 my $mail =

--- 08config.t DELETED ---



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