Bug 29697: Fix tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-01-24 17:01:11 +01:00 committed by Tomas Cohen Arazi
parent 45de338715
commit 9d1a2f27cf
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 4 additions and 4 deletions

View file

@ -287,7 +287,7 @@ sub run_tests {
is( $data->{ title }, $title, is( $data->{ title }, $title,
'ModBiblio correctly added the title field, and GetBiblioData.'); 'ModBiblio correctly added the title field, and GetBiblioData.');
is( $data->{ isbn }, $isbn, '(ModBiblio) ISBN is still there after ModBiblio.'); 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(); my ( $title_field, $title_subfield ) = get_title_field();
is( $marc->subfield( $title_field, $title_subfield ), $title, ); is( $marc->subfield( $title_field, $title_subfield ), $title, );
@ -424,8 +424,8 @@ sub run_tests {
is( GetMarcPrice( $record_for_isbn, $marcflavour ), 100, is( GetMarcPrice( $record_for_isbn, $marcflavour ), 100,
"GetMarcPrice returns the correct value"); "GetMarcPrice returns the correct value");
my $updatedrecord = $biblio->metadata->record;
my $frameworkcode = GetFrameworkCode($biblionumber); my $frameworkcode = GetFrameworkCode($biblionumber);
my $updatedrecord = $biblio->metadata->record;
my ( $biblioitem_tag, $biblioitem_subfield ) = GetMarcFromKohaField( "biblioitems.biblioitemnumber" ); my ( $biblioitem_tag, $biblioitem_subfield ) = GetMarcFromKohaField( "biblioitems.biblioitemnumber" );
die qq{No biblioitemnumber tag for framework "$frameworkcode"} unless $biblioitem_tag; die qq{No biblioitemnumber tag for framework "$frameworkcode"} unless $biblioitem_tag;
my $biblioitemnumbertotest; my $biblioitemnumbertotest;
@ -716,7 +716,7 @@ subtest 'MarcFieldForCreatorAndModifier' => sub {
$c4_context->mock('userenv', sub { return { number => 321, firstname => 'Jane', surname => 'Doe'}; }); $c4_context->mock('userenv', sub { return { number => 321, firstname => 'Jane', surname => 'Doe'}; });
C4::Biblio::ModBiblio($record, $biblionumber, ''); 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', 'a'), 123, '998$a = 123');
is($record->subfield('998', 'b'), 'John Doe', '998$b = John Doe'); is($record->subfield('998', 'b'), 'John Doe', '998$b = John Doe');
is($record->subfield('998', 'c'), 321, '998$c = 321'); is($record->subfield('998', 'c'), 321, '998$c = 321');

View file

@ -785,7 +785,7 @@ subtest 'context option in ModBiblio is handled correctly' => sub {
ModBiblio($saved_record, $biblionumber, '', { overlay_context => { 'source' => 'test' } }); 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([ $expected_record = build_record([
# "250" field has been appended # "250" field has been appended