Bugzilla – Attachment 149921 Details for
Bug 33567
Remove fallback for Reference_NFL_statuses in C4/XSLT module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33567: Empty NFL_statuses pref in unit test
Bug-33567-Empty-NFLstatuses-pref-in-unit-test.patch (text/plain), 1.72 KB, created by
Marcel de Rooy
on 2023-04-20 07:03:48 UTC
(
hide
)
Description:
Bug 33567: Empty NFL_statuses pref in unit test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-04-20 07:03:48 UTC
Size:
1.72 KB
patch
obsolete
>From 5fc0bc73f5f01b3f58e088a7e63e01cc15bd5f1a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 20 Apr 2023 06:41:32 +0000 >Subject: [PATCH] Bug 33567: Empty NFL_statuses pref in unit test >Content-Type: text/plain; charset=utf-8 > >This test should fail now, since it would trigger the hardcoded >fallback in the XSLT module. > >Test plan: >Run t/db_dependent/XSLT.t >Should fail. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/XSLT.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/XSLT.t b/t/db_dependent/XSLT.t >index c4013aed2f..00c5ed52d7 100755 >--- a/t/db_dependent/XSLT.t >+++ b/t/db_dependent/XSLT.t >@@ -37,7 +37,7 @@ my $builder = t::lib::TestBuilder->new; > $schema->storage->txn_begin; > > subtest 'buildKohaItemsNamespace status tests' => sub { >- plan tests => 17; >+ plan tests => 18; > > t::lib::Mocks::mock_preference('Reference_NFL_Statuses', '1|2'); > t::lib::Mocks::mock_preference( 'OPACResultsLibrary', 'holdingbranch' ); >@@ -83,6 +83,9 @@ subtest 'buildKohaItemsNamespace status tests' => sub { > t::lib::Mocks::mock_preference('Reference_NFL_Statuses', '2'); > $xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); > like($xml,qr{<status>reallynotforloan</status>},"reallynotforloan when we change Reference_NFL_Statuses"); >+ t::lib::Mocks::mock_preference('Reference_NFL_Statuses', q{}); # empty, same effect >+ $xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); >+ like($xml,qr{<status>reallynotforloan</status>},"reallynotforloan when we empty Reference_NFL_Statuses"); > t::lib::Mocks::mock_preference('Reference_NFL_Statuses', '1|2'); > } > >-- >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 33567
:
149921
|
149922
|
149923
|
150837
|
150838
|
150839