Skip to content

Commit

Permalink
stop tests from trying to really send an email
Browse files Browse the repository at this point in the history
  • Loading branch information
wchristian committed Oct 25, 2015
1 parent 2e83b96 commit cefe961
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions t/email-template.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@ use utf8;
use Cwd 'abs_path';
my $tt2 = abs_path($0) .'t2';

use Test::More tests => 3;
use Test::More tests => 4;

use_ok 'Email::Template';

my $subject = "Email::Template is easy to use";

ok Email::Template->send( $tt2,
{
From => 'sender@domain.tld',
To => 'recipient@domain.tld',
Subject => 'Email::Template is easy to use',
Subject => $subject,
tt_new => { ENCODING => 'utf8' },
tt_vars => { key0 => 'value0', key1 => 'value1', },
convert => { no_rowspacing => 1, rm => 80, },
mime_lite_send => [
"sub",
sub { like shift->as_string, qr/$subject/, "email was sent" }
]
}
),
'Email::Template->send()';
Expand All @@ -26,7 +32,7 @@ isa_ok Email::Template->send( $tt2,
{
From => 'sender@domain.tld',
To => 'recipient@domain.tld',
Subject => 'Email::Template is easy to use',
Subject => $subject,
tt_new => { ENCODING => 'utf8' },
tt_vars => { key0 => 'value0', key1 => 'カタカナ', },
return_mime_lite => 1,
Expand Down

0 comments on commit cefe961

Please sign in to comment.