Bugzilla – Attachment 128487 Details for
Bug 29690
Software error in details.pl when invalid MARCXML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29690: Unit test for get_components_query
Bug-29690-Unit-test-for-getcomponentsquery.patch (text/plain), 1.36 KB, created by
Martin Renvoize (ashimema)
on 2021-12-14 09:31:22 UTC
(
hide
)
Description:
Bug 29690: Unit test for get_components_query
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-12-14 09:31:22 UTC
Size:
1.36 KB
patch
obsolete
>From fdbd536810cdb6510b787ffc94443ea5d4107b12 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 14 Dec 2021 09:30:44 +0000 >Subject: [PATCH] Bug 29690: Unit test for get_components_query > >--- > t/db_dependent/Koha/Biblio.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 73dcb2ab13..8331de6563 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -565,7 +565,7 @@ subtest 'get_marc_components() tests' => sub { > }; > > subtest 'get_components_query' => sub { >- plan tests => 3; >+ plan tests => 4; > > my $biblio = $builder->build_sample_biblio(); > my $biblionumber = $biblio->biblionumber; >@@ -588,6 +588,11 @@ subtest 'get_components_query' => sub { > $biblio = Koha::Biblios->find( $biblio->biblionumber); > > is($biblio->get_components_query, "(((rcn:$biblionumber AND cni:OSt) OR rcn:\"OSt $biblionumber\") AND (bib-level:a OR bib-level:b))", "UseControlNumber enabled with MarcOrgCode"); >+ >+ $biblio->metadata->metadata('This is invalid for a MARC record')->store(); >+ $biblio = Koha::Biblios->find( $biblio->biblionumber); >+ >+ is($biblio->get_components_query, undef, "Invalid MARC record returns undefined and does not die"); > }; > > subtest 'orders() and active_orders() tests' => sub { >-- >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 29690
:
128484
|
128485
|
128486
|
128487
|
128488
|
128497
|
128530
|
128531
|
128532
|
128533
|
128541
|
128578
|
129339
|
129340
|
129341
|
129342
|
129343
|
129344
|
129345
|
129365
|
129381
|
129382
|
129542
|
129543
|
129730
|
129731