From f33ff229861e42b43f1b1e6ffb5b880885849833 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 18 Apr 2023 12:33:47 +0000 Subject: [PATCH] Bug 32484: (QA follow-up) Polishing unit test Content-Type: text/plain; charset=utf-8 Test plan, removed done_testing. License. Since we are in t/db, good to add transaction, although we currently do not change anything here. But who knows? Signed-off-by: Marcel de Rooy --- t/db_dependent/Koha/UI/Form/Builder/Biblio.t | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/UI/Form/Builder/Biblio.t b/t/db_dependent/Koha/UI/Form/Builder/Biblio.t index 476c9c3b9f..cdf93c4880 100755 --- a/t/db_dependent/Koha/UI/Form/Builder/Biblio.t +++ b/t/db_dependent/Koha/UI/Form/Builder/Biblio.t @@ -1,8 +1,23 @@ #!/usr/bin/perl +# This file is part of Koha +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + use Modern::Perl; -use Test::More; +use Test::More tests => 7; use C4::ClassSource; @@ -11,6 +26,9 @@ use Koha::DateUtils qw( dt_from_string ); use Koha::ItemTypes; use Koha::Libraries; +my $schema = Koha::Database->new->schema; +$schema->storage->txn_begin; + use_ok('Koha::UI::Form::Builder::Biblio'); subtest 'generate_subfield_form default value' => sub { @@ -179,4 +197,4 @@ subtest 'generate_subfield_form framework plugin' => sub { like($subfield->{marc_value}->{javascript}, qr,,s); }; -done_testing(); +$schema->storage->txn_rollback; -- 2.30.2