Bugzilla – Attachment 186176 Details for
Bug 39419
Holds API treats 'expiration_date' as 'patron_expiration_date'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39419: (follow-up) Unit tests
Bug-39419-follow-up-Unit-tests.patch (text/plain), 1.74 KB, created by
Brendan Lawlor
on 2025-09-04 18:25:11 UTC
(
hide
)
Description:
Bug 39419: (follow-up) Unit tests
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2025-09-04 18:25:11 UTC
Size:
1.74 KB
patch
obsolete
>From 1920fcf9dd32559cf812416ac3f4fb0b78b57c75 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Thu, 4 Sep 2025 17:58:31 +0000 >Subject: [PATCH] Bug 39419: (follow-up) Unit tests > >perl t/db_dependent/Reserves.t >--- > t/db_dependent/Reserves.t | 27 ++++++++++++++++++++++++++- > 1 file changed, 26 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index 79d6796f82..ef0fec81b3 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -1507,7 +1507,7 @@ subtest 'IsAvailableForItemLevelRequest() tests' => sub { > > subtest 'AddReserve() tests' => sub { > >- plan tests => 2; >+ plan tests => 4; > > $schema->storage->txn_begin; > >@@ -1553,6 +1553,31 @@ subtest 'AddReserve() tests' => sub { > $patron->discard_changes; > isnt( $patron->lastseen, undef, "Patron activity tracked when hold is a valid trigger" ); > >+ my $reserve_id = AddReserve( >+ { >+ branchcode => $library->branchcode, >+ borrowernumber => $patron->id, >+ biblionumber => $biblio->id, >+ expiration_date => '2040-04-02' >+ } >+ ); >+ >+ my $hold = Koha::Holds->find($reserve_id); >+ >+ is( $hold->expirationdate, '2040-04-02', 'Successfully set expiration date' ); >+ >+ $reserve_id = AddReserve( >+ { >+ branchcode => $library->branchcode, >+ borrowernumber => $patron->id, >+ biblionumber => $biblio->id, >+ patron_expiration_date => '2040-04-02' >+ } >+ ); >+ >+ $hold = Koha::Holds->find($reserve_id); >+ is( $hold->patron_expiration_date, '2040-04-02', 'Successfully set patron expiration date' ); >+ > $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 39419
:
185568
|
186176
|
186177
|
186240