Bug 16155: [QA Follow-up] Add transaction to BiblioFrameworks.t

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.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2016-04-21 09:15:19 +02:00 committed by Kyle M Hall
parent 2862b19918
commit 9c136f3d76
1 changed files with 4 additions and 2 deletions

View File

@ -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;