From 6f114096faee45594a90d346550cdab4bd5c98ab Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Sat, 11 Nov 2023 11:06:32 +0000 Subject: [PATCH] Bug 30287: (follow-up) Make unit test more reliable in ktd This patch mocks NoticeCSS earlier to ensure we're not inadvertantly failing due to a local setup in ktd having added to the preference. --- t/db_dependent/Koha/Notice/Message.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Notice/Message.t b/t/db_dependent/Koha/Notice/Message.t index 27265987fde..e9f87f0aa37 100755 --- a/t/db_dependent/Koha/Notice/Message.t +++ b/t/db_dependent/Koha/Notice/Message.t @@ -72,6 +72,8 @@ subtest 'html_content() tests' => sub { } ); + t::lib::Mocks::mock_preference( 'NoticeCSS', '' ); + my $css_import = ''; my $message = Koha::Notice::Messages->find($message_id); my $wrapped_compare = <<"WRAPPED"; sub { $firstname - + $css_import This is a test template using borrower $borrowernumber @@ -92,6 +94,7 @@ WRAPPED my $css_sheet = 'https://localhost/shiny.css'; t::lib::Mocks::mock_preference( 'NoticeCSS', $css_sheet ); + $css_import = qq{ $wrapped_compare = <<"WRAPPED"; $firstname - + $css_import This is a test template using borrower $borrowernumber -- 2.41.0