From 13924706e27fe60eeba3a27b81aab7fee5b2fd89 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. Signed-off-by: David Nind --- 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 27265987fd..72192655f9 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.30.2