From 785efcce3ffdc9df05d924b6fc07ed065173e2b8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 25 May 2020 10:14:19 +0200 Subject: [PATCH] Bug 24413: (follow-up) Add tests Add missing transaction. --- t/db_dependent/Circulation/MarkIssueReturned.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/db_dependent/Circulation/MarkIssueReturned.t b/t/db_dependent/Circulation/MarkIssueReturned.t index af455e1349..4ff85a9ae4 100644 --- a/t/db_dependent/Circulation/MarkIssueReturned.t +++ b/t/db_dependent/Circulation/MarkIssueReturned.t @@ -194,6 +194,8 @@ subtest 'Manually pass a return date' => sub { subtest 'AutoRemoveOverduesRestrictions' => sub { plan tests => 2; + $schema->storage->txn_begin; + t::lib::Mocks::mock_preference('AutoRemoveOverduesRestrictions', 1); my $patron = $builder->build_object({ class => 'Koha::Patrons' }); @@ -223,4 +225,6 @@ subtest 'AutoRemoveOverduesRestrictions' => sub { $debarments = Koha::Patron::Debarments::GetDebarments({ borrowernumber => $patron->borrowernumber }); is( scalar @$debarments, 0, 'OVERDUES debarment is removed if patron does not have overdues' ); + + $schema->storage->txn_rollback; }; -- 2.20.1