Bugzilla – Attachment 194040 Details for
Bug 41880
Logs for moved holds don't indicate original bib number/item number
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41880: Add a unit test
Bug-41880-Add-a-unit-test.patch (text/plain), 1.71 KB, created by
Lucas Gass (lukeg)
on 2026-02-26 18:44:05 UTC
(
hide
)
Description:
Bug 41880: Add a unit test
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2026-02-26 18:44:05 UTC
Size:
1.71 KB
patch
obsolete
>From b7051ab27b66d12549b2d7b0a3f994ab6a63f41b Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 26 Feb 2026 18:43:32 +0000 >Subject: [PATCH] Bug 41880: Add a unit test > >--- > t/db_dependent/Koha/Hold.t | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Hold.t b/t/db_dependent/Koha/Hold.t >index 9ba3a0caa2e..8249ec72278 100755 >--- a/t/db_dependent/Koha/Hold.t >+++ b/t/db_dependent/Koha/Hold.t >@@ -39,6 +39,7 @@ use Koha::Libraries; > use Koha::Old::Holds; > use C4::Reserves qw( AddReserve ModReserveAffect ); > use C4::Circulation qw( AddReturn ); >+use JSON qw( decode_json ); > > my $schema = Koha::Database->new->schema; > my $builder = t::lib::TestBuilder->new; >@@ -1745,7 +1746,7 @@ subtest 'revert_found() tests' => sub { > }; > }; > subtest 'move_hold() tests' => sub { >- plan tests => 13; >+ plan tests => 16; > $schema->storage->txn_begin; > > my $patron = Koha::Patron->new( >@@ -1887,6 +1888,20 @@ subtest 'move_hold() tests' => sub { > > is( $logs_2->count, 1, 'Hold modification was logged' ); > >+ my $diff_2 = decode_json( $logs_2->next->diff ); >+ is( >+ $diff_2->{D}->{biblionumber}->{O}, $biblio3->biblionumber, >+ 'diff column for Old (O) contains original biblionumber for record level move' >+ ); >+ is( >+ $diff_2->{D}->{biblionumber}->{N}, $biblio4->biblionumber, >+ 'diff column for New (N) contains new biblionumber for record level move' >+ ); >+ is( >+ $diff_2->{D}->{itemnumber}, undef, >+ 'diff column contains undef itemnumber because this is a record level move' >+ ); >+ > #disable HoldsLog > t::lib::Mocks::mock_preference( 'HoldsLog', 0 ); > >-- >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 41880
:
194039
|
194040
|
194181
|
194182
|
194183
|
194188
|
194189
|
194190