From 79e4a6bde7f0da9ecbed0fa61a4ac25e3878fb6c Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 4 Oct 2018 14:08:05 -0300 Subject: [PATCH] Bug 11897: (QA follow-up) Fix tests Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- t/db_dependent/Items.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index a3287351f4..d8734f4eb3 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -33,7 +33,7 @@ use Koha::Caches; use t::lib::Mocks; use t::lib::TestBuilder; -use Test::More tests => 12; +use Test::More tests => 14; use Test::Warn; @@ -781,6 +781,8 @@ subtest '_mod_item_dates' => sub { subtest 'get_hostitemnumbers_of' => sub { plan tests => 1; + $schema->storage->txn_begin; + my $bib = MARC::Record->new(); $bib->append_fields( MARC::Field->new('100', ' ', ' ', a => 'Moffat, Steven'), @@ -791,6 +793,8 @@ subtest 'get_hostitemnumbers_of' => sub { my @itemnumbers = C4::Items::get_hostitemnumbers_of( $biblionumber ); is( @itemnumbers, 0, ); + + $schema->storage->txn_rollback; }; subtest 'Test logging for ModItem' => sub { @@ -830,6 +834,8 @@ subtest 'Test logging for ModItem' => sub { $schema->resultset('ActionLog')->search()->delete(); ModItem({ location => $location }, $bibnum, $itemnumber); is( $schema->resultset('ActionLog')->count(), 1, 'Undefined value defaults to true, triggers logging' ); + + $schema->storage->txn_rollback; }; subtest 'Check stockrotationitem relationship' => sub { -- 2.19.0