[siesta-commit] siesta/t 10plugin_subjecttag.t,1.4,1.5 15defer.t,1.2,1.3

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

From: clampr
Subject: [siesta-commit] siesta/t 10plugin_subjecttag.t,1.4,1.5 15defer.t,1.2,1.3
Date: 02:23 on 16 Mar 2003
Update of /cvsroot/siesta/siesta/t
In directory sc8-pr-cvs1:/tmp/cvs-serv657a/t

Modified Files:
	10plugin_subjecttag.t 15defer.t 
Log Message:
more towards deferred, plus a method generator that auto-chomps lines

Index: 10plugin_subjecttag.t
===================================================================
RCS file: /cvsroot/siesta/siesta/t/10plugin_subjecttag.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- 10plugin_subjecttag.t	15 Mar 2003 20:15:56 -0000	1.4
+++ 10plugin_subjecttag.t	16 Mar 2003 02:23:47 -0000	1.5
@@ -10,18 +10,18 @@
 my $mail = Siesta::Message->new;
 $mail->list( Test::MockObject->new->mock( name => sub { 'cockknocker' } ) );
 
-$mail->subject("Mark Hamill\n");
-is( $mail->subject, "Mark Hamill\n", "before" );
+$mail->subject("Mark Hamill");
+is( $mail->subject, "Mark Hamill", "before" );
 ok( !$plugin->process($mail) );
-is( $mail->subject, "[cockknocker] Mark Hamill\n", "added tag after" );
+is( $mail->subject, "[cockknocker] Mark Hamill", "added tag after" );
 
 ok( !$plugin->process($mail) );
-is( $mail->subject, "[cockknocker] Mark Hamill\n", "added tag once" );
+is( $mail->subject, "[cockknocker] Mark Hamill", "added tag once" );
 
-$mail->subject("Re: [cockknocker] Mark Hamill\n");
+$mail->subject("Re: [cockknocker] Mark Hamill");
 ok( !$plugin->process($mail) );
-is( $mail->subject, "Re: [cockknocker] Mark Hamill\n", "okay with Re: lines" );
+is( $mail->subject, "Re: [cockknocker] Mark Hamill", "okay with Re: lines" );
 
 $mail->subject("");
 ok( !$plugin->process($mail) );
-is( $mail->subject, "[cockknocker] no subject\n", "null subject handling" );
+is( $mail->subject, "[cockknocker] no subject", "null subject handling" );

Index: 15defer.t
===================================================================
RCS file: /cvsroot/siesta/siesta/t/15defer.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- 15defer.t	16 Mar 2003 01:02:49 -0000	1.2
+++ 15defer.t	16 Mar 2003 02:23:47 -0000	1.3
@@ -1,6 +1,6 @@
 #!perl -w
 use strict;
-use Test::More tests => 5;
+use Test::More tests => 7;
 use Siesta;
 use Siesta::Config;
 use File::Find::Rule;
@@ -17,20 +17,22 @@
 my $message = Siesta::Message->new(\*DATA);
 ok( $message, "made a message" );
 
-is( $message->subject, "yoohoo\n" );
+is( $message->subject, "yoohoo" );
 $message->list($list);
 
 my @deferred = $list->deferred;
 is( scalar @deferred, 0, "we have no deferred messages" );
 
-$message->defer( deferred_for => '' );
+$message->defer( for => 'the hell of it' );
 
 @deferred = $list->deferred;
 is( scalar @deferred, 1, "we have 1 deferred message" );
 
-is( $deferred[0]->subject, "yoohoo\n", "deferred message has correct subject" );
+is( $deferred[0]->subject, "yoohoo", "deferred message has correct subject" );
+is( $deferred[0]->deferred_for, "the hell of it", "deferred message has correct deferred reason" );
 
 __DATA__
+From: jay@xxxxxxxx.xxxxxxxxxx
 To: dealers@xxxxxxxx.xxxxxxxxxx
 Subject: yoohoo
 



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