Bug 34887: Fix transactions in db dependent Patron.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 53377edcc7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bc36b23180)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Marcel de Rooy 2023-09-22 14:14:02 +00:00 committed by Matt Blenkinsop
parent 8b43932ee8
commit dae4e8b649
1 changed files with 5 additions and 0 deletions

View File

@ -1080,6 +1080,8 @@ subtest 'safe_to_delete() tests' => sub {
ok( $patron->safe_to_delete, 'Can delete, all conditions met' );
my $messages = $patron->safe_to_delete->messages;
is_deeply( $messages, [], 'Patron can be deleted, no messages' );
$schema->storage->txn_rollback;
};
subtest 'article_request_fee() tests' => sub {
@ -1353,6 +1355,7 @@ subtest 'notify_library_of_registration()' => sub {
};
subtest 'update privacy tests' => sub {
$schema->storage->txn_begin;
plan tests => 5;
@ -1382,4 +1385,6 @@ subtest 'update privacy tests' => sub {
is( $old_checkout->borrowernumber, $anon_patron->id, "Checkout is successfully anonymized");
is( $patron->privacy(), 2, "Patron privacy is successfully updated");
$schema->storage->txn_rollback;
};