Bug 26518: Hide expected DBI warnings

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-10-09 12:09:08 +02:00
parent b0c39296c5
commit 1519050205

View file

@ -55,8 +55,13 @@ subtest 'AddBiblio' => sub {
$record->append_fields($lccn_field);
my $nb_biblios = Koha::Biblios->count;
my ( $biblionumber, $biblioitemnumber ) =
C4::Biblio::AddBiblio( $record, '' );
my ( $biblionumber, $biblioitemnumber );
{
local *STDERR;
open STDERR, '>', '/dev/null';
( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio( $record, '' );
close STDERR;
}
is( $biblionumber, undef,
'AddBiblio returns undef for biblionumber if something went wrong' );
is( $biblioitemnumber, undef,