Bugzilla – Attachment 176431 Details for
Bug 37996
Links created by link_marc_host should contain 773$0 in MARC21
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37996: Add unit tests
Bug-37996-Add-unit-tests.patch (text/plain), 2.46 KB, created by
Thibault Keromnès
on 2025-01-13 13:04:08 UTC
(
hide
)
Description:
Bug 37996: Add unit tests
Filename:
MIME Type:
Creator:
Thibault Keromnès
Created:
2025-01-13 13:04:08 UTC
Size:
2.46 KB
patch
obsolete
>From ffcb5f9c1b82eed13056c0358350bab1d12f043f Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Tue, 24 Sep 2024 14:10:02 +0200 >Subject: [PATCH] Bug 37996: Add unit tests > >Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr> >--- > t/db_dependent/Koha/Biblio.t | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 0576acca56..31166ef267 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -943,7 +943,7 @@ subtest 'get_volumes_query' => sub { > }; > > subtest 'generate_marc_host_field' => sub { >- plan tests => 22; >+ plan tests => 23; > > $schema->storage->txn_begin; > >@@ -974,6 +974,7 @@ subtest 'generate_marc_host_field' => sub { > is( $link->subfield('t'), 'Some boring read', 'MARC::Field->subfield(s) returns content from 245ab' ); > is( $link->subfield('x'), '0317-8471', 'MARC::Field->subfield(s) returns content from 022a' ); > is( $link->subfield('z'), undef, 'MARC::Field->subfield(s) returns undef when 020a is empty' ); >+ is( $link->subfield('0'), $biblio->biblionumber, 'MARC::Field->subfield(s) returns content from 999$c' ); > is( $link->subfield('w'), undef, 'MARC::Field->subfield(w) returns undef when "UseControlNumber" is disabled' ); > > t::lib::Mocks::mock_preference( 'UseControlNumber', '1' ); >@@ -1019,7 +1020,7 @@ subtest 'generate_marc_host_field' => sub { > }; > > subtest 'link_marc_host' => sub { >- plan tests => 6; >+ plan tests => 8; > $schema->storage->txn_begin; > > my $host = $builder->build_sample_biblio(); >@@ -1035,6 +1036,10 @@ subtest 'link_marc_host' => sub { > ref( $child_record->field('773') ), 'MARC::Field', > '773 field is set after calling link_marc_host({ host => $biblionumber })' > ); >+ is( >+ $child_record->field('773')->subfield('0'), $host->biblionumber, >+ '773$0 is properly filled' >+ ); > > $child = $builder->build_sample_biblio(); > $child_record = $child->metadata->record; >@@ -1058,6 +1063,10 @@ subtest 'link_marc_host' => sub { > ref( $child_record->field('773') ), 'MARC::Field', > '773 field is set after calling link_marc_host({ field => $link_field })' > ); >+ is( >+ $child_record->field('773')->subfield('0'), $host->biblionumber, >+ '773$0 is properly filled' >+ ); > > $schema->storage->txn_rollback; > }; >-- >2.39.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 37996
:
171928
|
171929
|
171930
| 176431 |
176432