Bugzilla – Attachment 174113 Details for
Bug 38100
Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38100: Unit tests
Bug-38100-Unit-tests.patch (text/plain), 2.24 KB, created by
Paul Derscheid
on 2024-11-07 11:13:39 UTC
(
hide
)
Description:
Bug 38100: Unit tests
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-11-07 11:13:39 UTC
Size:
2.24 KB
patch
obsolete
>From 4496b814f1ebe63eef2ae4b069c450e59574fa3b Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Fri, 4 Oct 2024 19:18:16 +0000 >Subject: [PATCH] Bug 38100: Unit tests > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > t/db_dependent/XSLT.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/XSLT.t b/t/db_dependent/XSLT.t >index 5f79b35b13..4f7ef3c84b 100755 >--- a/t/db_dependent/XSLT.t >+++ b/t/db_dependent/XSLT.t >@@ -82,12 +82,13 @@ subtest 'Tests moved from t' => sub { > }; > > subtest 'buildKohaItemsNamespace status tests' => sub { >- plan tests => 18; >+ plan tests => 20; > $schema->storage->txn_begin; > > t::lib::Mocks::mock_preference('Reference_NFL_Statuses', '1|2'); > t::lib::Mocks::mock_preference( 'OPACResultsLibrary', 'holdingbranch' ); > t::lib::Mocks::mock_preference( 'OPACResultsMaxItems', '2' ); >+ t::lib::Mocks::mock_preference( 'AllowHoldsOnDamagedItems', '0' ); > > my $itype = $builder->build_object({ class => 'Koha::ItemTypes' }); > my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' }); >@@ -152,6 +153,17 @@ subtest 'buildKohaItemsNamespace status tests' => sub { > $xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); > like($xml,qr{<substatus>Damaged</substatus>},"Damaged status takes precedence over Lost"); > >+ my $item2 = $builder->build_sample_item( { itype => $itype->itemtype } ); >+ $item2->holdingbranch( $holdinglibrary->branchcode )->store; >+ $item2->biblioitem->itemtype( $itemtype->itemtype )->store; >+ $item2->damaged(1)->store; >+ >+ $xml = C4::XSLT::buildKohaItemsNamespace( $item2->biblionumber, [] ); >+ like( $xml, qr{<status>other</status>}, "Damaged status with AllowHoldsOnDamagedItems = 0 results in 'other'" ); >+ t::lib::Mocks::mock_preference( 'AllowHoldsOnDamagedItems', '1' ); >+ $xml = C4::XSLT::buildKohaItemsNamespace( $item2->biblionumber, [] ); >+ like( $xml, qr{<status>available</status>}, "Damaged status with AllowHoldsOnDamagedItems results in 'available'" ); >+ > $builder->build({ source => "Branchtransfer", value => { > itemnumber => $item->itemnumber, > datearrived => undef, >-- >2.39.5
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 38100
:
172426
|
172427
|
172429
|
172430
|
174112
| 174113 |
174114