Bugzilla – Attachment 161792 Details for
Bug 35357
Item not removed from holds queue when checked out to a different patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35357: Enhance unit tests
Bug-35357-Enhance-unit-tests.patch (text/plain), 2.37 KB, created by
Kyle M Hall (khall)
on 2024-02-06 17:15:24 UTC
(
hide
)
Description:
Bug 35357: Enhance unit tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-02-06 17:15:24 UTC
Size:
2.37 KB
patch
obsolete
>From e14e146fb4b0b458f674354b24070cfbc92f22c4 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 6 Feb 2024 12:11:12 -0500 >Subject: [PATCH] Bug 35357: Enhance unit tests > >--- > t/db_dependent/HoldsQueue.t | 22 ++++++++++++++++++---- > 1 file changed, 18 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index 8fb0b94c4c2..39c6b3ab3ae 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -2095,7 +2095,7 @@ subtest "GetItemsAvailableToFillHoldsRequestsForBib" => sub { > > subtest 'Remove item from holds queue on checkout' => sub { > >- plan tests => 2; >+ plan tests => 4; > > $schema->storage->txn_begin; > >@@ -2114,7 +2114,9 @@ subtest 'Remove item from holds queue on checkout' => sub { > } > ); > >- my $item = $builder->build_sample_item( { homebranch => $lib->branchcode, holdingbranch => $lib->branchcode } ); >+ my $item = $builder->build_sample_item( { homebranch => $lib->branchcode, holdingbranch => $lib->branchcode } ); >+ my $item2 = $builder->build_sample_item( >+ { homebranch => $lib->branchcode, holdingbranch => $lib->branchcode, biblionumber => $item->biblionumber } ); > > t::lib::Mocks::mock_userenv( { branchcode => $lib->branchcode } ); > >@@ -2132,15 +2134,27 @@ subtest 'Remove item from holds queue on checkout' => sub { > > is( > Koha::Hold::HoldsQueueItems->search( { itemnumber => $item->id } )->count(), 1, >- "Item is found in the holds queue" >+ "One item is found in the holds queue" > ); > >- AddIssue( $patron1, $item->barcode, dt_from_string ); >+ my $hq_item = Koha::Hold::HoldsQueueItems->search( { itemnumber => $item->id } )->next->item; >+ >+ AddIssue( $patron1, $hq_item->barcode, dt_from_string ); > > is( > Koha::Hold::HoldsQueueItems->search( { itemnumber => $item->id } )->count(), 0, > "Item is no longer found in the holds queue" > ); > >+ C4::HoldsQueue::CreateQueue(); >+ >+ is( >+ Koha::Hold::HoldsQueueItems->search( { itemnumber => $item2->id } )->count(), 1, >+ "One item is found in the holds queue" >+ ); >+ >+ my $hq_item2 = Koha::Hold::HoldsQueueItems->search( { itemnumber => $item2->id } )->next->item; >+ isnt( $hq_item->id, $hq_item2->id, "Item now targetd by the holds queue is not the same item." ); >+ > $schema->storage->txn_rollback; > }; >-- >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 35357
:
160851
|
160852
|
161009
|
161010
|
161789
|
161790
|
161791
|
161792
|
161849
|
161850
|
161851