From c27fd3e7fbf03e7d7baa81ecc37cef7685834a12 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. --- t/Koha_Email.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/Koha_Email.t b/t/Koha_Email.t index 764f5c1..93dd55b 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'); -- 1.9.1