Bugzilla – Attachment 136022 Details for
Bug 27981
Add option to automatically set the 001 control number to the biblionumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27981: (follow-up) Fix tests
Bug-27981-follow-up-Fix-tests.patch (text/plain), 1.78 KB, created by
Nick Clemens (kidclamp)
on 2022-06-13 12:23:24 UTC
(
hide
)
Description:
Bug 27981: (follow-up) Fix tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-06-13 12:23:24 UTC
Size:
1.78 KB
patch
obsolete
>From df31e73a0c234c4e7d118fa468158cfe1b0cad64 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 13 Jun 2022 12:22:37 +0000 >Subject: [PATCH] Bug 27981: (follow-up) Fix tests > >--- > 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 1c0a662d28..d824ed861b 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 { >@@ -834,12 +835,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.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27981
:
118461
|
118513
|
119704
|
119705
|
119717
|
121805
|
122280
|
122301
|
122344
|
122356
|
122672
|
122674
|
122675
|
124279
|
124280
|
124281
|
128223
|
128224
|
128225
|
132034
|
132035
|
132036
|
134536
|
134537
|
134538
|
134539
|
136022
|
140092
|
140093
|
140094
|
140095
|
140096
|
140097
|
140502