Bugzilla – Attachment 135666 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.74 KB, created by
Marcel de Rooy
on 2022-06-03 08:51:32 UTC
(
hide
)
Description:
Bug 29697: Fix tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-06-03 08:51:32 UTC
Size:
2.74 KB
patch
obsolete
>From 08ff0662810f4638547c34a5c1f95dd553ecb7a0 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 >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Biblio.t | 6 +++--- > t/db_dependent/Biblio/MarcOverlayRules.t | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index 1e14196033..ea8a8240ae 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -287,7 +287,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,8 @@ sub run_tests { > > is( GetMarcPrice( $record_for_isbn, $marcflavour ), 100, > "GetMarcPrice returns the correct value"); >- my $updatedrecord = $biblio->metadata->record; > my $frameworkcode = GetFrameworkCode($biblionumber); >+ my $updatedrecord = $biblio->metadata->record; > my ( $biblioitem_tag, $biblioitem_subfield ) = GetMarcFromKohaField( "biblioitems.biblioitemnumber" ); > die qq{No biblioitemnumber tag for framework "$frameworkcode"} unless $biblioitem_tag; > my $biblioitemnumbertotest; >@@ -716,7 +716,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 dd3c720599..dc66860a8b 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.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 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