Bug 22368: (QA follow-up) Mute db errors in test

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Josef Moravec 2019-02-20 16:08:38 +00:00 committed by Nick Clemens
parent f8466fcc6a
commit 3459fd9493

View file

@ -83,6 +83,9 @@ subtest 'constraints' => sub {
plan tests => 11;
$schema->storage->txn_begin;
my $print_error = $schema->storage->dbh->{PrintError};
$schema->storage->dbh->{PrintError} = 0;
my $patron = $builder->build_object( { class => "Koha::Patrons" } );
my $biblio = $builder->build_sample_biblio();
my $branch = $builder->build_object( { class => "Koha::Libraries" } );
@ -164,5 +167,6 @@ subtest 'constraints' => sub {
is( $suggestion->budgetid, undef,
"The suggestion is not deleted when the related budget is deleted" );
$schema->storage->dbh->{PrintError} = $print_error;
$schema->storage->txn_rollback;
};