#!/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;