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 => 24; |
29 |
plan tests => 25; |
30 |
|
30 |
|
31 |
t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef ); |
31 |
t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef ); |
32 |
|
32 |
|
Lines 62-74
subtest 'create() tests' => sub {
Link Here
|
62 |
|
62 |
|
63 |
$email = Koha::Email->create( |
63 |
$email = Koha::Email->create( |
64 |
{ |
64 |
{ |
65 |
from => 'from@example.com', |
65 |
from => 'from@8.8.8.8', |
66 |
to => 'to@example.com', |
66 |
to => 'to@example.com', |
67 |
bcc => 'root@localhost', |
67 |
bcc => 'root@localhost', |
68 |
} |
68 |
} |
69 |
); |
69 |
); |
70 |
|
70 |
|
71 |
is( $email->email->header('Bcc'), 'root@localhost', 'Non-FQDN (@localhost) supported' ); |
71 |
is( $email->email->header('Bcc'), 'root@localhost', 'Non-FQDN (@localhost) supported' ); |
|
|
72 |
is( $email->email->header('From'), 'from@8.8.8.8', 'IPs supported' ); |
72 |
|
73 |
|
73 |
t::lib::Mocks::mock_preference( 'SendAllEmailsTo', 'catchall@example.com' ); |
74 |
t::lib::Mocks::mock_preference( 'SendAllEmailsTo', 'catchall@example.com' ); |
74 |
t::lib::Mocks::mock_preference( 'ReplytoDefault', 'replytodefault@example.com' ); |
75 |
t::lib::Mocks::mock_preference( 'ReplytoDefault', 'replytodefault@example.com' ); |
75 |
- |
|
|