Browse Source

Bug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t

Resolve:
    #   Failed test 'Item's biblioitemnumber has not changed'
    #   at t/db_dependent/ImportBatch.t line 407.
    #
    #          got: '4261'
    #     expected: '2371'

Do not compare $item1->biblionumber with $original_biblioitemnumber :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23.05.x
Marcel de Rooy 1 year ago
committed by Tomas Cohen Arazi
parent
commit
bf8e0a394f
Signed by: tomascohen GPG Key ID: 0A272EA1B2F3C15F
  1. 2
      C4/ImportBatch.pm
  2. 2
      t/db_dependent/ImportBatch.t

2
C4/ImportBatch.pm

@ -799,7 +799,7 @@ sub _batchCommitItems {
$updsth->finish(); $updsth->finish();
$num_items_replaced++; $num_items_replaced++;
} elsif ( } elsif (
# We aren't replacing, but the incoming file ahs a barcode, we need to check if it exists # We aren't replacing, but the incoming file has a barcode, we need to check if it exists
$duplicate_barcode && $duplicate_barcode &&
( $item_match = Koha::Items->find({ barcode => $item->{'barcode'} }) ) ( $item_match = Koha::Items->find({ barcode => $item->{'barcode'} }) )
) { ) {

2
t/db_dependent/ImportBatch.t

@ -404,7 +404,7 @@ subtest "Do not adjust biblionumber when replacing items during import" => sub {
is( $import_item->import_error, undef, 'No error was reported' ); is( $import_item->import_error, undef, 'No error was reported' );
is( $item1->biblionumber, $original_biblionumber, "Item's biblionumber has not changed" ); is( $item1->biblionumber, $original_biblionumber, "Item's biblionumber has not changed" );
is( $item1->biblionumber, $original_biblioitemnumber, "Item's biblioitemnumber has not changed" ); is( $item1->biblioitemnumber, $original_biblioitemnumber, "Item's biblioitemnumber has not changed" );
is( $item1->homebranch, $library->branchcode, "Item was overlaid successfully" ); is( $item1->homebranch, $library->branchcode, "Item was overlaid successfully" );
}; };

Loading…
Cancel
Save