Bug 42147: Update tests

To test: prove t/db_dependent/Reserves.t

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Emily Lamancusa 2026-03-23 11:07:56 -04:00 committed by Martin Renvoize
parent 83e2c3888d
commit ccc5ca534c
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
1 changed files with 6 additions and 3 deletions

View File

@ -2058,7 +2058,7 @@ subtest 'CheckReserves() item type tests' => sub {
};
subtest 'Bug 40866: AddReserve override JSON logging' => sub {
plan tests => 8;
plan tests => 9;
$schema->storage->txn_begin;
@ -2104,7 +2104,10 @@ subtest 'Bug 40866: AddReserve override JSON logging' => sub {
);
is( $logs->count, 1, 'One log entry created for normal hold' );
my $log = $logs->next;
is( $log->info, $hold_id, 'Normal hold logs hold ID only' );
my $log_data = eval { from_json( $log->info ) };
ok( !$@, 'Log info is valid JSON' );
ok( !defined( $log_data->{confirmations} ), 'Confirmations array is undefined' );
# Cancel the hold for next test
my $hold = Koha::Holds->find($hold_id);
@ -2134,7 +2137,7 @@ subtest 'Bug 40866: AddReserve override JSON logging' => sub {
is( $logs->count, 1, 'One log entry created for override hold' );
$log = $logs->next;
my $log_data = eval { from_json( $log->info ) };
$log_data = eval { from_json( $log->info ) };
ok( !$@, 'Log info is valid JSON' );
ok( exists $log_data->{confirmations}, 'JSON contains confirmations array' );
is_deeply(