Bugzilla – Attachment 183042 Details for
Bug 40034
CheckReserves dies if itype doesn't exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40034: Regression tests
Bug-40034-Regression-tests.patch (text/plain), 1.52 KB, created by
Marcel de Rooy
on 2025-06-06 06:56:09 UTC
(
hide
)
Description:
Bug 40034: Regression tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-06-06 06:56:09 UTC
Size:
1.52 KB
patch
obsolete
>From 544fffe4883cfb0f38e365ca090a65d3e307fe74 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 2 Jun 2025 09:46:30 -0300 >Subject: [PATCH] Bug 40034: Regression tests >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Reserves.t | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index b66706dcfc..b6361fac5c 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 69; >+use Test::More tests => 70; > use Test::MockModule; > use Test::Warn; > >@@ -2091,3 +2091,24 @@ subtest 'HOLDDGST tests' => sub { > > $schema->txn_rollback; > }; >+ >+# FIXME: This shouldn't be needed if the item type was a FK constraint for items >+subtest 'CheckReserves() item type tests' => sub { >+ >+ plan tests => 1; >+ >+ $schema->storage->txn_begin; >+ >+ my $item_type_to_delete = $builder->build_object( { class => 'Koha::ItemTypes' } ); >+ my $non_existent_itype = $item_type_to_delete->itemtype; >+ $item_type_to_delete->delete; >+ >+ t::lib::Mocks::mock_preference( 'TrapHoldsOnOrder', 0 ); >+ >+ my $item = $builder->build_sample_item( { itype => $non_existent_itype, notforloan => 0, damaged => 0 } ); >+ >+ my ($res) = CheckReserves($item); >+ is( $res, '', 'No holds on new item' ); >+ >+ $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 40034
:
182908
|
182909
|
182913
|
182914
| 183042 |
183043