Bug 15485: (QA followup) Fix behaviour and default values
[koha.git] / t / Koha_Email.t
1 use Modern::Perl;
2
3 use t::lib::Mocks;
4 use Test::More tests => 4;                      # last test to print
5
6 use_ok('Koha::Email');
7
8 my $from = 'chrisc@catalyst.net.nz';
9 t::lib::Mocks::mock_preference('ReplytoDefault', $from);
10 t::lib::Mocks::mock_preference('ReturnpathDefault', $from);
11
12
13
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');