You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
575 B

#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use LDV::Email;
use Test::More tests => 3;
my $email = LDV::Email->new({from => 'noreply@state.gov.no'});
isa_ok($email, "LDV::Email", "LDV::Email->new");
can_ok($email, qw(create send));
my @args = ('user@acme.com', 'Registration', 'body text');
my $expected = join("\r\n",
'From: noreply@state.gov.no',
'Reply-To: admin@example.com',
'To: user@acme.com',
'Subject: Registration',
'',
'body text',
'');
my $got = $email->create(@args);
$got =~ s/^Date:.*\r\n//m;
is($got, $expected, "creating of test email");
exit 0;