Koha/t/Koha_Email.t
Chris Cormack 86c251c6db Bug 13172 t/Koha_Email.t was database dependent
To test
1/ Stop your database server
2/ run t/Koha_Email.t
3/ Notice the errors
4/ Apply patch
5/ run t/Koha_Email.t again
6/ No errors

(Don't forget to restart your db server after)

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>

Verified that it fixes a package build.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tests pass now without database connection.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 12:10:32 -03:00

16 lines
480 B
Perl
Executable file

use Modern::Perl;
use t::lib::Mocks;
use Test::More tests => 4; # last test to print
use_ok('Koha::Email');
my $from = 'chrisc@catalyst.net.nz';
t::lib::Mocks::mock_preference('ReplytoDefault', $from);
t::lib::Mocks::mock_preference('ReturnpathDefault', $from);
ok( my $email = Koha::Email->new(), 'Create a Koha::Email Object');
ok( my %mail = $email->create_message_headers({from => $from}),'Set headers');
is ($mail{'From'}, $from, 'Set correctly');