From 91b7799c96f66e9c60cdf1c1e2db640427e435e0 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 6 Oct 2023 11:16:48 +0100 Subject: [PATCH] Bug 15504: (follow-up) Add Triggers mock to unit tests Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/ILSDI_Services.t | 2 ++ t/db_dependent/SIP/Message.t | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t index 2ecda5500c..39fb1d6a8a 100755 --- a/t/db_dependent/ILSDI_Services.t +++ b/t/db_dependent/ILSDI_Services.t @@ -47,6 +47,8 @@ subtest 'AuthenticatePatron test' => sub { $schema->storage->txn_begin; + t::lib::Mocks::mock_preference( 'TrackLastPatronActivityTriggers', 'connection' ); + my $plain_password = 'tomasito'; $builder->build({ diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t index 0d58cdd968..0bf33b9438 100755 --- a/t/db_dependent/SIP/Message.t +++ b/t/db_dependent/SIP/Message.t @@ -189,10 +189,13 @@ subtest 'hold_patron_name() tests' => sub { subtest 'Lastseen response' => sub { + plan tests => 6; + my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; - plan tests => 6; + t::lib::Mocks::mock_preference( 'TrackLastPatronActivityTriggers', 'connection' ); + my $builder = t::lib::TestBuilder->new(); my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; my ( $response, $findpatron );