@@ -, +, @@ DeleteBiblioInBatch() --- t/db_dependent/ImportBatch.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/t/db_dependent/ImportBatch.t +++ a/t/db_dependent/ImportBatch.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use Modern::Perl; -use Test::More tests => 14; +use Test::More tests => 15; use Cwd qw(abs_path); use File::Temp qw/tempfile/; @@ -144,6 +144,11 @@ $dbh->do( "DELETE FROM items WHERE itemnumber=?", undef, $itemno ); is( @a, 0, 'No item numbers expected since we deleted the item' ); $dbh->do( $sql, undef, undef, $import_record_id ); # remove link again +#Test DeleteBiblioInBatch +my @a = DeleteBiblioInBatch( $import_record_id); #Remove the MARC record from import_biblios and import_records tables +my $biblio_in_import_records = $dbh->do('SELECT * FROM import_records WHERE import_batch_id = "$import_record_id"'); +is( $biblio_in_import_records, "0E0", 'No biblio expected since we deleted the biblio from the batch' ); + # fresh data my $sample_import_batch3 = { matcher_id => 3, --