Bug 18413: Fix Letters.t (following bug 17866)
SendAlert now needs a userenv to find branch email and the fallback of KohaAdminEmailAddress if the branch mail is not filled. Test plan: Run t/db_dependent/Letters.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
7d35bdf58a
commit
2471dab71d
1 changed files with 5 additions and 0 deletions
|
@ -423,6 +423,11 @@ $bookseller->contacts->next->email('testemail@mydomain.com')->store;
|
|||
# Ensure that the preference 'LetterLog' is set to logging
|
||||
t::lib::Mocks::mock_preference( 'LetterLog', 'on' );
|
||||
|
||||
# SendAlerts needs branchemail or KohaAdminEmailAddress as sender
|
||||
C4::Context->_new_userenv('DUMMY');
|
||||
C4::Context->set_userenv( 0, 0, 0, 'firstname', 'surname', $library->{branchcode}, 'My Library', 0, '', '');
|
||||
t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' );
|
||||
|
||||
{
|
||||
warning_is {
|
||||
$err = SendAlerts( 'orderacquisition', $basketno , 'TESTACQORDER' ) }
|
||||
|
|
Loading…
Reference in a new issue