Better test cases, removing my email address.
J. Shirley [Fri, 1 Jun 2007 00:43:48 +0000 (00:43 +0000)]
t/05template.t
t/lib/TestApp/Controller/Root.pm

index f6676d8..688f672 100644 (file)
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use Test::More tests => 5;
+use Test::More tests => 10;
 
 use Email::Send::Test;
 use FindBin;
@@ -21,8 +21,8 @@ my @parts = $emails[0]->parts;
 cmp_ok(@parts, '==', 2, 'got parts');
 
 is($parts[0]->content_type, 'text/plain; charset="us-ascii"', 'text/plain ok');
-like($parts[0]->body, qr/jshirley\@picturetrail.com on $time/, 'got content back');
+like($parts[0]->body, qr/test-email\@example.com on $time/, 'got content back');
 is($parts[1]->content_type, 'text/html; charset="us-ascii"', 'text/html ok');
-like($parts[1]->body, qr{<em>jshirley\@picturetrail.com</em> on $time}, 'got content back');
+like($parts[1]->body, qr{<em>test-email\@example.com</em> on $time}, 'got content back');
 #like($emails[0]->body, qr/$time/, 'Got our email');
 
index ec7ed14..737018e 100644 (file)
@@ -15,8 +15,8 @@ sub email : Global('email') {
     my $time = $c->req->params->{time} || time;
 
     $c->stash->{email} = {
-        to      => 'jshirley@picturetrail.com',
-        from    => 'no-reply@toeat.com',
+        to      => 'test-email@example.com',
+        from    => 'no-reply@example.com',
         subject => 'Email Test',
         body    => "Email Sent at: $time"
     };
@@ -37,8 +37,8 @@ sub template_email : Global('template_email') {
     $c->stash->{time} = $c->req->params->{time} || time;
 
     $c->stash->{email} = {
-        to      => 'jshirley@picturetrail.com',
-        from    => 'no-reply@toeat.com',
+        to      => 'test-email@example.com',
+        from    => 'no-reply@example.com',
         subject => 'Just a test',
         content_type => 'multipart/alternative',
         templates => [