Bugzilla – Attachment 150837 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.75 KB, created by
Jonathan Druart
on 2023-05-09 10:23:11 UTC
(
hide
)
Description:
Bug 33567: Empty NFL_statuses pref in unit test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-09 10:23:11 UTC
Size:
1.75 KB
patch
obsolete
>From 5ab42dc09fe92cee4600ee683397f7d6b1337738 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 > >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> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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 c4013aed2fb..00c5ed52d76 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.25.1
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