From d72161bfa79821d4df993e06ab92b540d7c635ef Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 11 Nov 2024 13:17:56 +0000 Subject: [PATCH] Bug 17976: (QA follow-up) Add missing transaction rollback We were missing the transaction wrapper for the overdue_fines test added in this patchset. This caused problems in subsequent tests. --- t/db_dependent/Koha/Checkout.t | 4 ++++ t/db_dependent/Koha/Checkouts.t | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Checkout.t b/t/db_dependent/Koha/Checkout.t index 5effd76a692..4e60a35d280 100755 --- a/t/db_dependent/Koha/Checkout.t +++ b/t/db_dependent/Koha/Checkout.t @@ -29,6 +29,8 @@ my $schema = Koha::Database->new->schema; subtest 'overdue_fines' => sub { plan tests => 4; + + $schema->storage->txn_begin; my $checkout = $builder->build_object( { @@ -80,6 +82,8 @@ subtest 'overdue_fines' => sub { $overdue->id, 'Koha::Checkout->overdue_fines should return the correct overdue_fines' ); + + $schema->storage->txn_rollback; }; subtest 'library() tests' => sub { diff --git a/t/db_dependent/Koha/Checkouts.t b/t/db_dependent/Koha/Checkouts.t index d696aca9210..312029037ac 100755 --- a/t/db_dependent/Koha/Checkouts.t +++ b/t/db_dependent/Koha/Checkouts.t @@ -328,7 +328,7 @@ subtest 'automatic_checkin' => sub { my $tomorrow = dt_from_string->add( days => 1 ); my $yesterday = dt_from_string->subtract( days => 1 ); - # Checkout do for automatic checkin + # Checkout due for automatic checkin my $checkout_due_aci = Koha::Checkout->new( { borrowernumber => $patron->borrowernumber, -- 2.47.0