From 03cc3e41fa3c5caa247648d48b15d3ed53a547bb Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 2 May 2024 11:42:41 +0000 Subject: [PATCH] Bug 35993: (follow-up) Another fix for MarcOverlayRules.t Content-Type: text/plain; charset=utf-8 We should not assume comparing within the same second. Now just remove 005 before comparing. Signed-off-by: Marcel de Rooy --- t/db_dependent/Biblio/MarcOverlayRules.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/db_dependent/Biblio/MarcOverlayRules.t b/t/db_dependent/Biblio/MarcOverlayRules.t index 2e0b1990c6..9ba27a93b9 100755 --- a/t/db_dependent/Biblio/MarcOverlayRules.t +++ b/t/db_dependent/Biblio/MarcOverlayRules.t @@ -769,9 +769,9 @@ subtest 'context option in ModBiblio is handled correctly' => sub { [ '500', 'a', 'One bottle of beer in the fridge' ], # original [ '999', 'c', $biblionumber, 'd', $biblioitemnumber ], # created by AddBiblio ]); - $expected_record->insert_fields_ordered( - MARC::Field->new( '005', $saved_record->field('005')->data ), - ); # simulate same timestamp + + # Remove timestamp from saved record when comparing + $saved_record->delete_fields( $saved_record->field('005') ); # Make sure leader is equal after AddBiblio $expected_record->leader($saved_record->leader()); @@ -798,9 +798,9 @@ subtest 'context option in ModBiblio is handled correctly' => sub { [ '500', 'a', 'One cold bottle of beer in the fridge' ], [ '999', 'c', $biblionumber, 'd', $biblioitemnumber ], # created by AddBiblio ]); - $expected_record->insert_fields_ordered( - MARC::Field->new( '005', $saved_record->field('005')->data ), - ); # simulate same timestamp + + # Remove timestamp from saved record when comparing + $updated_record->delete_fields( $updated_record->field('005') ); # Make sure leader is equal after ModBiblio $expected_record->leader($updated_record->leader()); -- 2.30.2