From c6ded5a0e15cf6eac875e6636df5481df1d654b2 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 11 Jul 2022 23:53:28 -0300 Subject: [PATCH] Bug 31133: Regression tests (1) Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/TestBuilder_multi_vfk.t | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 t/db_dependent/TestBuilder_multi_vfk.t diff --git a/t/db_dependent/TestBuilder_multi_vfk.t b/t/db_dependent/TestBuilder_multi_vfk.t new file mode 100644 index 0000000000..6745287025 --- /dev/null +++ b/t/db_dependent/TestBuilder_multi_vfk.t @@ -0,0 +1,42 @@ +#!/usr/bin/perl + +# Copyright 2022 Koha Development team +# +# 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 tests => 2; + +use Koha::Database; +use Koha::Checkouts::Renewals; + +use t::lib::TestBuilder; + +my $builder = t::lib::TestBuilder->new; +my $schema = Koha::Database->new->schema; + +$schema->storage->txn_begin; + +my $module = 'Koha::Checkouts::Renewals'; + +my $object; +eval { $object = $builder->build_object( { class => $module } ) }; +is( ref($object), $module->object_class, "Testing $module" ); +eval {$object->get_from_storage}; +is( $@, '', "Module $module should have koha_object[s]_class method if needed" ); + +$schema->storage->txn_rollback; -- 2.37.0