Bugzilla – Attachment 122653 Details for
Bug 28676
AutoCreateAuthorities can repeatedly generate authority records when using Default linker and heading is cached
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28676: Unit test
Bug-28676-Unit-test.patch (text/plain), 1.42 KB, created by
Nick Clemens (kidclamp)
on 2021-07-07 15:44:28 UTC
(
hide
)
Description:
Bug 28676: Unit test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-07-07 15:44:28 UTC
Size:
1.42 KB
patch
obsolete
>From b26ab23e910776ad8493f01c9602cf943921408e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 7 Jul 2021 15:39:21 +0000 >Subject: [PATCH] Bug 28676: Unit test > >--- > t/db_dependent/Biblio.t | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index feac71d8eb..22b79e5563 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -167,7 +167,7 @@ subtest "GetMarcFromKohaField" => sub { > }; > > subtest "Authority creation with default linker" => sub { >- plan tests => 2; >+ plan tests => 4; > # Automatic authority creation > t::lib::Mocks::mock_preference('LinkerModule', 'Default'); > t::lib::Mocks::mock_preference('BiblioAddsAuthorities', 1); >@@ -188,6 +188,10 @@ subtest "Authority creation with default linker" => sub { > my ($num_changed,$results) = LinkBibHeadingsToAuthorities($linker, $marc_record, "",undef); > is( $num_changed, 0, "We shouldn't link or create a new record"); > ok( !defined $results->{added}, "If we have multiple matches, we shouldn't create a new record"); >+ >+ ($num_changed,$results) = LinkBibHeadingsToAuthorities($linker, $marc_record, "",undef); >+ is( $num_changed, 0, "We shouldn't link or create a new record using cached result"); >+ ok( !defined $results->{added}, "If we have multiple matches, we shouldn't create a new record on second instance"); > }; > > >-- >2.20.1
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 28676
:
122653
|
122654
|
124430
|
124431
|
125026
|
125027
|
125028