From 9a7568ee663877407e10e08cbd86b10025b8923a Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 21 Apr 2016 09:15:19 +0200 Subject: [PATCH] Bug 16155: [QA Follow-up] Add transaction to BiblioFrameworks.t Content-Type: text/plain; charset=utf-8 This unit test does not have a transaction. It does not need TestBuilder. Test plan: [1] Optionally remove records with mfw1, mfw2 from biblio_framework table. If you ran this test before and it failed, you may have them. [2] Run the test. --- t/db_dependent/Koha/BiblioFrameworks.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/BiblioFrameworks.t b/t/db_dependent/Koha/BiblioFrameworks.t index 3a6accd..d2e31d9 100644 --- a/t/db_dependent/Koha/BiblioFrameworks.t +++ b/t/db_dependent/Koha/BiblioFrameworks.t @@ -21,9 +21,10 @@ use Modern::Perl; use Test::More tests => 3; use Koha::BiblioFramework; use Koha::BiblioFrameworks; -use t::lib::TestBuilder; -my $builder = t::lib::TestBuilder->new; +my $schema = Koha::Database->new->schema; +$schema->storage->txn_begin; + my $nb_of_frameworks = Koha::BiblioFrameworks->search->count; my $new_framework_1 = Koha::BiblioFramework->new({ frameworkcode => 'mfw1', @@ -41,3 +42,4 @@ is( $retrieved_framework_1->frameworktext, $new_framework_1->frameworktext, 'Fin $retrieved_framework_1->delete; is( Koha::BiblioFrameworks->search->count, $nb_of_frameworks + 1, 'Delete should have deleted the biblio framework' ); +$schema->storage->txn_rollback; -- 1.7.10.4