Bug 18083: Simplify the condition - if there are more than 1 library
[koha.git] / t / Koha_Email.t
blob93dd55bd6d396f51d1ce03e6b667606071c7d802
1 use Modern::Perl;
3 use t::lib::Mocks;
4 use Test::More tests => 4;                      # last test to print
6 use_ok('Koha::Email');
8 my $from = 'chrisc@catalyst.net.nz';
9 t::lib::Mocks::mock_preference('ReplytoDefault', $from);
10 t::lib::Mocks::mock_preference('ReturnpathDefault', $from);
14 ok( my $email = Koha::Email->new(), 'Create a Koha::Email Object');
15 ok( my %mail = $email->create_message_headers({from => $from}),'Set headers');
16 is ($mail{'From'}, $from, 'Set correctly');