From 86c251c6db5ff7ad14e313d8748318e7f3d51841 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Fri, 31 Oct 2014 11:15:17 +1300 Subject: [PATCH] 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 Verified that it fixes a package build. Signed-off-by: Katrin Fischer Works as described, tests pass now without database connection. Signed-off-by: Tomas Cohen Arazi --- t/Koha_Email.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/Koha_Email.t b/t/Koha_Email.t index 764f5c19aa..93dd55bd6d 100755 --- a/t/Koha_Email.t +++ b/t/Koha_Email.t @@ -1,10 +1,15 @@ 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'); -- 2.39.5