From afecf632c335c53a0a110dd6cdd7935bd9cbb784 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 18 Oct 2022 09:35:17 -0300 Subject: [PATCH] Bug 25426: (QA follow-up) Make subtest stand on its own Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Circulation/Branch.t | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Circulation/Branch.t b/t/db_dependent/Circulation/Branch.t index ef6fc31408..53e26d2d6a 100755 --- a/t/db_dependent/Circulation/Branch.t +++ b/t/db_dependent/Circulation/Branch.t @@ -329,7 +329,9 @@ t::lib::Mocks::mock_preference( 'item-level_itypes', 1 ); is($messages->{NeedsTransfer},undef,"AddReturn respects branch item return policy - noreturn"); t::lib::Mocks::mock_preference( 'item-level_itypes', 0 ); -subtest "Test GetBranchItemRule" => sub { +$schema->storage->txn_rollback; + +subtest "GetBranchItemRule() tests" => sub { plan tests => 3; $schema->storage->txn_begin; @@ -348,9 +350,10 @@ subtest "Test GetBranchItemRule" => sub { } ); + my $biblio = $builder->build_sample_biblio; my $item = Koha::Item->new( { - biblionumber => $biblionumber, + biblionumber => $biblio->id, homebranch => $homebranch, holdingbranch => $holdingbranch, itype => $sampleitemtype1->{itemtype} @@ -395,5 +398,3 @@ subtest "Test GetBranchItemRule" => sub { $schema->storage->txn_rollback; }; - -$schema->storage->txn_rollback; -- 2.20.1