Bugzilla – Attachment 186177 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), 2.00 KB, created by
Brendan Lawlor
on 2025-09-04 18:25:14 UTC
(
hide
)
Description:
Bug 39419: (follow-up) Unit tests
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2025-09-04 18:25:14 UTC
Size:
2.00 KB
patch
obsolete
>From a9c7fc92713594251da1e630db7989cb5592bb0f Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Thu, 4 Sep 2025 18:24:07 +0000 >Subject: [PATCH] Bug 39419: (follow-up) Unit tests > >--- > t/db_dependent/Reserves.t | 45 ++++++++++++++++++++++++++++++++++++++- > 1 file changed, 44 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index ef0fec81b3..703cf41b6a 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 70; >+use Test::More tests => 71; > use Test::NoWarnings; > use Test::MockModule; > use Test::Warn; >@@ -1581,6 +1581,49 @@ subtest 'AddReserve() tests' => sub { > $schema->storage->txn_rollback; > }; > >+subtest 'ModReserve() tests' => sub { >+ >+ plan tests => 1; >+ >+ $schema->storage->txn_begin; >+ >+ my $library = $builder->build_object( { class => 'Koha::Libraries' } ); >+ my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { lastseen => undef } } ); >+ my $biblio = $builder->build_sample_biblio; >+ >+ my $reserve_id = AddReserve( >+ { >+ branchcode => $library->branchcode, >+ borrowernumber => $patron->id, >+ biblionumber => $biblio->id, >+ } >+ ); >+ >+ my $hold = Koha::Holds->find($reserve_id); >+ >+ ModReserve( >+ { >+ branchcode => $reserve_id, >+ expiration_date => '2040-04-02', >+ } >+ ); >+ >+ $hold = Koha::Holds->find($reserve_id); >+ is( $hold->expirationdate, '2040-04-02', 'Successfully updated expiration date' ); >+ >+ ModReserve( >+ { >+ branchcode => $reserve_id, >+ patron_expiration_date => '2040-04-02' >+ } >+ ); >+ >+ $hold = Koha::Holds->find($reserve_id); >+ is( $hold->patron_expiration_date, '2040-04-02', 'Successfully updated patron expiration date' ); >+ >+ $schema->storage->txn_rollback; >+}; >+ > subtest 'AlterPriorty() tests' => sub { > > plan tests => 2; >-- >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