From 11208cf6deeecffd887fb3153b85746063abe6e8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 28 May 2025 16:57:55 +0200 Subject: [PATCH] Bug 40021: Remove warnings from Koha/Plugins/Recall_hooks.t Test plan: prove t/db_dependent/Koha/Plugins/Recall_hooks.t should return green --- t/db_dependent/Koha/Plugins/Recall_hooks.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Koha/Plugins/Recall_hooks.t b/t/db_dependent/Koha/Plugins/Recall_hooks.t index f62911123db..2130ca5d06e 100755 --- a/t/db_dependent/Koha/Plugins/Recall_hooks.t +++ b/t/db_dependent/Koha/Plugins/Recall_hooks.t @@ -16,8 +16,9 @@ use Modern::Perl; use File::Basename; -use Test::More tests => 4; +use Test::More tests => 5; use Test::MockModule; +use Test::NoWarnings; use Test::Warn; use t::lib::Mocks; @@ -86,7 +87,7 @@ subtest 'after_recall_action hook' => sub { C4::Circulation::AddIssue( $patron2, $item->barcode ); - warnings_exist { + warnings_like { Koha::Recalls->add_recall( { patron => $patron1, @@ -98,7 +99,10 @@ subtest 'after_recall_action hook' => sub { } ); } - qr/after_recall_action called with action: add, ref: Koha::Recall/, + [ + qr/transform_prepared_letter called with letter content/, + qr/after_recall_action called with action: add, ref: Koha::Recall/ + ], '->add_recall calls the after_recall_action hook with action add'; Koha::Plugins->RemovePlugins; -- 2.34.1