From 03700313003151ca97e4ca1ae32681ec451d4664 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 1 Nov 2023 14:50:47 +0000 Subject: [PATCH] Bug 35215: Add few assumptions in Suggestions.t around emailing Test plan: Without this patch, set pref ReplytoDefault or EmailAddressForSuggestions. Run t/db_dependent/Suggestions.t (FAIL) Fill branch email and reply for CPL branch. Run t/db_dependent/Suggestions.t (FAIL: more errors) Apply patch. Run t/db_dependent/Suggestions.t (PASS) Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- t/db_dependent/Suggestions.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Suggestions.t b/t/db_dependent/Suggestions.t index 5a6f7a2bbe..abcbd626c5 100755 --- a/t/db_dependent/Suggestions.t +++ b/t/db_dependent/Suggestions.t @@ -473,8 +473,10 @@ subtest 'EmailPurchaseSuggestions' => sub { 'New suggestion does not send an email when EmailPurchaseSuggestions disabled' ); # EmailPurchaseSuggestions set to BranchEmailAddress - t::lib::Mocks::mock_preference( "EmailPurchaseSuggestions", - "BranchEmailAddress" ); + t::lib::Mocks::mock_preference( "EmailPurchaseSuggestions", "BranchEmailAddress" ); + t::lib::Mocks::mock_preference( "ReplytoDefault", "" ); + t::lib::Mocks::mock_preference( "EmailAddressForSuggestions", "" ); + Koha::Libraries->find('CPL')->update( { branchemail => '', branchreplyto => '' } ); Koha::Suggestion->new($my_suggestion)->store; t::lib::Mocks::mock_preference( "ReplytoDefault", 'library@b.c' ); -- 2.30.2