From e0f0b9569569e05424a8de2d2e93a442a88f4a49 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 13 Jun 2022 12:22:37 +0000 Subject: [PATCH] Bug 27981: (follow-up) Fix tests Signed-off-by: Andrew Nugged --- t/db_dependent/Biblio.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index 2037a6b4c6..5f1313a2ae 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -70,6 +70,7 @@ subtest 'AddBiblio' => sub { t::lib::Mocks::mock_preference( 'BiblioAddsAuthorities', $marcflavour ); t::lib::Mocks::mock_preference( 'AutoCreateAuthorities', $marcflavour ); + t::lib::Mocks::mock_preference( 'autoControlNumber', "OFF" ); my $mock_biblio = Test::MockModule->new("C4::Biblio"); $mock_biblio->mock( BiblioAutoLink => sub { @@ -835,12 +836,12 @@ subtest 'autoControlNumber tests' => sub { is($record->field('001'), undef, '001 not set when pref is off'); t::lib::Mocks::mock_preference('autoControlNumber', 'biblionumber'); - C4::Biblio::ModBiblio($record, $biblionumber, "", 1); + C4::Biblio::ModBiblio($record, $biblionumber, "", { skip_record_index => 1, disable_autolink => 1 }); $record = GetMarcBiblio({biblionumber => $biblionumber}); is($record->field('001')->as_string(), $biblionumber, '001 set to biblionumber when pref set and field is blank'); $record->field('001')->update('Not biblionumber'); - C4::Biblio::ModBiblio($record, $biblionumber, "", 1); + C4::Biblio::ModBiblio($record, $biblionumber, "", { skip_record_index => 1, disable_autolink => 1 }); $record = GetMarcBiblio({biblionumber => $biblionumber}); is($record->field('001')->as_string(), 'Not biblionumber', '001 not set to biblionumber when pref set and field exists'); -- 2.37.2