Bugzilla – Attachment 158895 Details for
Bug 30287
Notices using HTML render differently in notices.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30287: (follow-up) Make unit test more reliable in ktd
Bug-30287-follow-up-Make-unit-test-more-reliable-i.patch (text/plain), 1.95 KB, created by
David Nind
on 2023-11-13 17:30:54 UTC
(
hide
)
Description:
Bug 30287: (follow-up) Make unit test more reliable in ktd
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-11-13 17:30:54 UTC
Size:
1.95 KB
patch
obsolete
>From 13924706e27fe60eeba3a27b81aab7fee5b2fd89 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >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 <david@davidnind.com> >--- > 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"; > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >@@ -80,7 +82,7 @@ subtest 'html_content() tests' => sub { > <head> > <title>$firstname</title> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >- >+ $css_import > </head> > <body> > 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{<link rel="stylesheet" type="text/css" href="$css_sheet">}; > > $wrapped_compare = <<"WRAPPED"; > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >@@ -100,7 +103,7 @@ WRAPPED > <head> > <title>$firstname</title> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >- <link rel="stylesheet" type="text/css" href="$css_sheet"> >+ $css_import > </head> > <body> > This is a test template using borrower $borrowernumber >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30287
:
158517
|
158519
|
158520
|
158648
|
158649
|
158650
|
158651
|
158652
|
158653
|
158654
|
158655
|
158656
|
158834
|
158869
|
158870
|
158871
|
158872
|
158873
|
158892
|
158893
|
158894
|
158895
|
159431
|
159432
|
159433
|
159434