Bugzilla – Attachment 173610 Details for
Bug 38233
ILS-DI GetRecords should filter out items hidden in OPAC and use OPAC MARCXML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38233: Add regression tests
Bug-38233-Add-regression-tests.patch (text/plain), 2.08 KB, created by
Pedro Amorim
on 2024-10-29 10:22:09 UTC
(
hide
)
Description:
Bug 38233: Add regression tests
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-10-29 10:22:09 UTC
Size:
2.08 KB
patch
obsolete
>From c1ab601c05d1b267566f83350c6d7e521f1c0fcc Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 29 Oct 2024 10:20:04 +0000 >Subject: [PATCH] Bug 38233: Add regression tests > >prove t/db_dependent/ILSDI_Services.t > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > t/db_dependent/ILSDI_Services.t | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index c7e728a3fb..df7e65a374 100755 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -760,7 +760,7 @@ subtest 'Holds test with start_date and end_date' => sub { > > subtest 'GetRecords' => sub { > >- plan tests => 8; >+ plan tests => 10; > > $schema->storage->txn_begin; > >@@ -825,6 +825,30 @@ subtest 'GetRecords' => sub { > is($reply_reserve->{biblionumber}, $item->biblionumber, 'GetRecords has a reserve tag'); > is($reply_reserve->{borrowernumber}, undef, 'GetRecords does not expose borrowernumber in reserve tag'); > >+ # Check for hidelostitems sys pref >+ t::lib::Mocks::mock_preference( 'hidelostitems', 1 ); >+ $item->itemlost(1)->store; >+ $cgi->param( service => 'GetRecords' ); >+ $cgi->param( id => $item->biblionumber ); >+ my $itemlost_reply = C4::ILSDI::Services::GetRecords($cgi); >+ is( >+ $itemlost_reply->{record}->[0]->{items}->{item}->[0], undef, >+ 'GetRecords does not show lost items if hidelostitems = 1' >+ ); >+ $item->itemlost(0)->store; >+ >+ # Check for OpacHiddenItems sys pref >+ t::lib::Mocks::mock_preference( 'OpacHiddenItems', 'withdrawn: [1]' ); >+ $item->withdrawn(1)->store; >+ $cgi->param( service => 'GetRecords' ); >+ $cgi->param( id => $item->biblionumber ); >+ my $itemwithdrawn_reply = C4::ILSDI::Services::GetRecords($cgi); >+ is( >+ $itemwithdrawn_reply->{record}->[0]->{items}->{item}->[0], >+ undef, >+ 'GetRecords does not show withdrawn items if OpacHiddenItems contains \'withdrawn: [1]\'' >+ ); >+ > $schema->storage->txn_rollback; > }; > >-- >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 38233
:
173187
|
173236
|
173609
| 173610