From 59e0047fc67a61e3b33c6890d4dfe7620a656265 Mon Sep 17 00:00:00 2001
From: Tomas Cohen Arazi <tomascohen@theke.io>
Date: Thu, 17 Apr 2025 15:14:30 -0300
Subject: [PATCH] Bug 38441: (QA follow-up) Minor change

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
---
 installer/data/mysql/atomicupdate/bug_38441.pl          | 2 +-
 t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/installer/data/mysql/atomicupdate/bug_38441.pl b/installer/data/mysql/atomicupdate/bug_38441.pl
index 9a584ebc3d1..4455cf45521 100755
--- a/installer/data/mysql/atomicupdate/bug_38441.pl
+++ b/installer/data/mysql/atomicupdate/bug_38441.pl
@@ -19,6 +19,6 @@ return {
                     );
                 }
         );
-        say $out "Added new system preference 'ILLHistoryCheck'";
+        say_success( $out, "Added new system preference 'ILLHistoryCheck'" );
     },
 };
diff --git a/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t b/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
index 873ea4c30b1..86f0f2065ac 100755
--- a/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
+++ b/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
@@ -28,7 +28,8 @@ use t::lib::Mocks;
 use Koha::ILL::Request::Workflow::HistoryCheck;
 use Koha::Database;
 
-my $schema = Koha::Database->new->schema;
+my $schema  = Koha::Database->new->schema;
+my $builder = t::lib::TestBuilder->new;
 
 my $isbn = '321321321';
 
@@ -38,8 +39,6 @@ subtest 'show_history_check' => sub {
 
     $schema->storage->txn_begin;
 
-    my $builder = t::lib::TestBuilder->new;
-
     use_ok('Koha::ILL::Request::Workflow::HistoryCheck');
 
     my $fake_cardnumber = '123456789';
@@ -122,8 +121,6 @@ subtest 'after_request_created' => sub {
 
     $schema->storage->txn_begin;
 
-    my $builder = t::lib::TestBuilder->new;
-
     my $fake_cardnumber = '123456789';
     my $metadata        = {
         title      => 'This is a title',
@@ -187,6 +184,7 @@ subtest 'after_request_created' => sub {
         'Contains staffnotes related submissions by self patron'
     );
 
+    $schema->storage->txn_rollback;
 };
 
 1;
-- 
2.39.5