Bugzilla – Attachment 41229 Details for
Bug 11299
Add a button to automatically link authority records in cataloguing (AJAX)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11299 - Adds test in t/Biblio.t to test the new sub in Biblio.pm
Bug-11299---Adds-test-in-tBibliot-to-test-the-new-.patch (text/plain), 1.35 KB, created by
Rémi Mayrand-Provencher
on 2015-07-29 20:06:54 UTC
(
hide
)
Description:
Bug 11299 - Adds test in t/Biblio.t to test the new sub in Biblio.pm
Filename:
MIME Type:
Creator:
Rémi Mayrand-Provencher
Created:
2015-07-29 20:06:54 UTC
Size:
1.35 KB
patch
obsolete
>From 46c292e8fdc52b1fa9ab2c9985346a0e674ffb5b Mon Sep 17 00:00:00 2001 >From: remi <remi.mayrand-provencher@inLibro.com> >Date: Wed, 29 Jul 2015 16:04:50 -0400 >Subject: [PATCH] Bug 11299 - Adds test in t/Biblio.t to test the new sub in > Biblio.pm > >Also fixes some forbidden patterns. >--- > C4/Biblio.pm | 3 +++ > t/Biblio.t | 3 ++- > 2 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 2930f4c..9d9b01f 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -650,6 +650,9 @@ sub AddAuthorityFromHeading { > my $field = shift; > my $bib = shift; > >+ if(!defined $heading || !defined $field || !defined $bib){ >+ return 0; >+ } > my $authtypedata = > C4::AuthoritiesMarc::GetAuthType( $heading->auth_type() ); > my $marcrecordauth = MARC::Record->new(); >diff --git a/t/Biblio.t b/t/Biblio.t >index 3217e77..76dc5be 100755 >--- a/t/Biblio.t >+++ b/t/Biblio.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 46; >+use Test::More tests => 47; > use Test::MockModule; > use Test::Warn; > use DBD::Mock; >@@ -180,4 +180,5 @@ warnings_like { $ret = UpdateTotalIssues() } > > ok( !defined $ret, 'UpdateTotalIssues returns carped warning if biblio record does not exist'); > >+is(C4::Biblio::AddAuthorityFromHeading(), 0, 'AddAuthorityFromHeading returns zero if not passed heading, field or bib'); > 1; >-- >1.7.9.5
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 11299
:
23146
|
26715
|
33074
|
37912
|
37913
|
37972
|
38737
|
39477
|
39478
|
39479
|
40831
|
41229
|
45218
|
56440
|
56508
|
56509
|
58307
|
60998
|
63311
|
63312
|
63313
|
64075
|
67162
|
67708
|
67709
|
67710
|
67712
|
67713
|
67714
|
67824
|
67825
|
67826
|
67827
|
67828
|
67829
|
79385
|
79386
|
79387
|
79388
|
79389
|
79390
|
79391
|
79392
|
79393
|
79394
|
79395
|
79396
|
79397
|
79398
|
79399
|
79447
|
79448
|
79449
|
79450
|
79451
|
79452
|
79545
|
94818
|
95126
|
95152
|
98571
|
98572
|
99249
|
108091
|
108309
|
108310
|
108396
|
108552
|
108834
|
108835
|
109062
|
109063
|
109069
|
109181
|
110553
|
110554
|
110555
|
110556
|
110557
|
110568
|
110569
|
110570
|
110571
|
110572
|
111706
|
111707
|
111708
|
111709
|
111710
|
112125
|
112126
|
112127
|
112128
|
112129
|
112130
|
112131
|
112132
|
112133
|
112134
|
112135
|
113562
|
113563
|
113564
|
113565
|
113566
|
113567
|
113568
|
114803
|
114924
|
114925
|
114926
|
114927
|
114928
|
114929
|
114930
|
114931
|
114932