Bugzilla – Attachment 143036 Details for
Bug 31889
Insert 952 tags in correct order when embedding items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31889: Add unit test to show problem
Bug-31889-Add-unit-test-to-show-problem.patch (text/plain), 1.95 KB, created by
Katrin Fischer
on 2022-11-02 19:53:07 UTC
(
hide
)
Description:
Bug 31889: Add unit test to show problem
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-11-02 19:53:07 UTC
Size:
1.95 KB
patch
obsolete
>From fd8c8e849612b5135798db43cef0e5a1853b1ae2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 20 Oct 2022 14:27:25 +0000 >Subject: [PATCH] Bug 31889: Add unit test to show problem > >Test plan: >Run t/db_dependent/Koha/Biblio/Metadata.t >Fails with: > not ok 10 - 951-952s-953 in 245,100,942,951,953,999,952,952,952,952,952,952,952,952 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Koha/Biblio/Metadata.t | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Biblio/Metadata.t b/t/db_dependent/Koha/Biblio/Metadata.t >index 6adc4e75d4..f64bfedb55 100755 >--- a/t/db_dependent/Koha/Biblio/Metadata.t >+++ b/t/db_dependent/Koha/Biblio/Metadata.t >@@ -86,7 +86,7 @@ subtest 'record() tests' => sub { > }; > > subtest '_embed_items' => sub { >- plan tests => 8; >+ plan tests => 10; > > $schema->storage->txn_begin(); > >@@ -190,5 +190,20 @@ subtest '_embed_items' => sub { > 'For OPAC, If all items are hidden, no item should have been embedded' > ); > >+ # Check position of 952 in response of embed_items marc >+ t::lib::Mocks::mock_preference( 'OpacHiddenItems', q{} ); >+ $record = $biblio->metadata->record; >+ $record->insert_fields_ordered( >+ MARC::Field->new( '951', '', '', a => 'before items' ), >+ MARC::Field->new( '953', '', '', a => 'after items' ), >+ ); >+ C4::Biblio::ModBiblio( $record, $biblio->biblionumber, q{} ); >+ my $field_list = join ',', map { $_->tag } $record->fields; >+ ok( $field_list =~ /951,953/, "951 and 953 in $field_list" ); >+ $biblio->discard_changes; >+ $record = $biblio->metadata->record({ embed_items => 1 }); >+ $field_list = join ',', map { $_->tag } $record->fields; >+ ok( $field_list =~ /951,(952,)+953/, "951-952s-953 in $field_list" ); >+ > $schema->storage->txn_rollback; > }; >-- >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 31889
:
142254
|
142255
|
142256
|
142273
|
142274
|
142275
|
143035
| 143036 |
143037
|
143348
|
143350