|
Lines 26-32
use_ok('Koha::Email');
Link Here
|
| 26 |
|
26 |
|
| 27 |
subtest 'create() tests' => sub { |
27 |
subtest 'create() tests' => sub { |
| 28 |
|
28 |
|
| 29 |
plan tests => 23; |
29 |
plan tests => 24; |
| 30 |
|
30 |
|
| 31 |
t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef ); |
31 |
t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef ); |
| 32 |
|
32 |
|
|
Lines 60-65
subtest 'create() tests' => sub {
Link Here
|
| 60 |
like( $email->email->content_type, qr|charset="?iso-8859-1"?|, "Charset set correctly"); |
60 |
like( $email->email->content_type, qr|charset="?iso-8859-1"?|, "Charset set correctly"); |
| 61 |
like( $email->email->header('Message-ID'), qr/\<.*@.*\>/, 'Value set correctly' ); |
61 |
like( $email->email->header('Message-ID'), qr/\<.*@.*\>/, 'Value set correctly' ); |
| 62 |
|
62 |
|
|
|
63 |
$email = Koha::Email->create( |
| 64 |
{ |
| 65 |
from => 'from@example.com', |
| 66 |
to => 'to@example.com', |
| 67 |
bcc => 'root@localhost', |
| 68 |
} |
| 69 |
); |
| 70 |
|
| 71 |
is( $email->email->header('Bcc'), 'root@localhost', 'Non-FQDN (@localhost) supported' ); |
| 72 |
|
| 63 |
t::lib::Mocks::mock_preference( 'SendAllEmailsTo', 'catchall@example.com' ); |
73 |
t::lib::Mocks::mock_preference( 'SendAllEmailsTo', 'catchall@example.com' ); |
| 64 |
t::lib::Mocks::mock_preference( 'ReplytoDefault', 'replytodefault@example.com' ); |
74 |
t::lib::Mocks::mock_preference( 'ReplytoDefault', 'replytodefault@example.com' ); |
| 65 |
t::lib::Mocks::mock_preference( 'ReturnpathDefault', 'returnpathdefault@example.com' ); |
75 |
t::lib::Mocks::mock_preference( 'ReturnpathDefault', 'returnpathdefault@example.com' ); |
| 66 |
- |
|
|