Bugzilla – Attachment 129761 Details for
Bug 29697
Replace GetMarcBiblio occurrences with $biblio->metadata->record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29697: Fix tests
Bug-29697-Fix-tests.patch (text/plain), 2.88 KB, created by
Jonathan Druart
on 2022-01-25 14:55:40 UTC
(
hide
)
Description:
Bug 29697: Fix tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-01-25 14:55:40 UTC
Size:
2.88 KB
patch
obsolete
>From 72adc68d184479f15e9b93414453f037ae6a279b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 24 Jan 2022 17:01:11 +0100 >Subject: [PATCH] Bug 29697: Fix tests > >--- > t/db_dependent/Biblio.t | 7 ++++--- > t/db_dependent/Biblio/MarcOverlayRules.t | 2 +- > 2 files changed, 5 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index ca3498f5275..972f6c7627d 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -285,7 +285,7 @@ sub run_tests { > is( $data->{ title }, $title, > 'ModBiblio correctly added the title field, and GetBiblioData.'); > is( $data->{ isbn }, $isbn, '(ModBiblio) ISBN is still there after ModBiblio.'); >- $marc = $biblio->metadata->record; >+ $marc = $biblio->get_from_storage->metadata->record; > my ( $title_field, $title_subfield ) = get_title_field(); > is( $marc->subfield( $title_field, $title_subfield ), $title, ); > >@@ -424,8 +424,9 @@ sub run_tests { > "GetMarcPrice returns the correct value"); > my $newincbiblioitemnumber=$biblioitemnumber+1; > $dbh->do("UPDATE biblioitems SET biblioitemnumber = ? WHERE biblionumber = ?;", undef, $newincbiblioitemnumber, $biblionumber ); >- my $updatedrecord = $biblio->metadata->record; > my $frameworkcode = GetFrameworkCode($biblionumber); >+ my $updatedrecord = $biblio->metadata->record; >+ C4::Biblio::_koha_marc_update_bib_ids($updatedrecord, $frameworkcode, $biblionumber, $newincbiblioitemnumber); > my ( $biblioitem_tag, $biblioitem_subfield ) = GetMarcFromKohaField( "biblioitems.biblioitemnumber" ); > die qq{No biblioitemnumber tag for framework "$frameworkcode"} unless $biblioitem_tag; > my $biblioitemnumbertotest; >@@ -712,7 +713,7 @@ subtest 'MarcFieldForCreatorAndModifier' => sub { > $c4_context->mock('userenv', sub { return { number => 321, firstname => 'Jane', surname => 'Doe'}; }); > C4::Biblio::ModBiblio($record, $biblionumber, ''); > >- $record = $biblio->metadata->record; >+ $record = $biblio->get_from_storage->metadata->record; > is($record->subfield('998', 'a'), 123, '998$a = 123'); > is($record->subfield('998', 'b'), 'John Doe', '998$b = John Doe'); > is($record->subfield('998', 'c'), 321, '998$c = 321'); >diff --git a/t/db_dependent/Biblio/MarcOverlayRules.t b/t/db_dependent/Biblio/MarcOverlayRules.t >index dd3c7205997..dc66860a8bb 100755 >--- a/t/db_dependent/Biblio/MarcOverlayRules.t >+++ b/t/db_dependent/Biblio/MarcOverlayRules.t >@@ -785,7 +785,7 @@ subtest 'context option in ModBiblio is handled correctly' => sub { > > ModBiblio($saved_record, $biblionumber, '', { overlay_context => { 'source' => 'test' } }); > >- my $updated_record = $biblio->metadata->record; >+ my $updated_record = $biblio->get_from_storage->metadata->record; > > $expected_record = build_record([ > # "250" field has been appended >-- >2.25.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 29697
:
129757
|
129758
|
129759
|
129760
|
129761
|
131868
|
131869
|
131870
|
131871
|
131872
|
131873
|
134066
|
134067
|
134068
|
134069
|
134070
|
134071
|
135574
|
135575
|
135576
|
135577
|
135578
|
135579
|
135580
|
135662
|
135663
|
135664
|
135665
|
135666
|
135667
|
135668
|
135669
|
135670
|
135671
|
135672
|
135673
|
135797
|
135798
|
135799
|
135800
|
135801
|
135802
|
135978
|
135979
|
135980
|
135981
|
135982
|
137835
|
137836
|
137837
|
137838
|
137839
|
137840
|
137894
|
137918
|
137919
|
137920
|
137921
|
137922
|
137923
|
137924
|
137948
|
138057
|
138076
|
138077
|
138078
|
138079
|
138080
|
138081
|
138089
|
138090
|
138804
|
139127
|
140007
|
140008