Bug 29838: Fix string interpolation in ImportBatch.t

Test plan:
Tests should return green

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5525498eb3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2022-01-10 11:34:27 +01:00 committed by Andrew Fuerste-Henry
parent 3455e6eae9
commit 51772308e4
1 changed files with 9 additions and 4 deletions

View File

@ -174,13 +174,13 @@ my $id_import_batch3 = C4::ImportBatch::AddImportBatch($sample_import_batch3);
# Test CleanBatch
C4::ImportBatch::CleanBatch( $id_import_batch3 );
my $batch3_clean = $dbh->do('SELECT * FROM import_records WHERE import_batch_id = "$id_import_batch3"');
is( $batch3_clean, "0E0", "Batch 3 has been cleaned" );
my $import_record = get_import_record( $id_import_batch3 );
is( $import_record, "0E0", "Batch 3 has been cleaned" );
# Test DeleteBatch
C4::ImportBatch::DeleteBatch( $id_import_batch3 );
my $batch3_results = $dbh->do('SELECT * FROM import_batches WHERE import_batch_id = "$id_import_batch3"');
is( $batch3_results, "0E0", "Batch 3 has been deleted");
my $import_batch = C4::ImportBatch::GetImportBatch( $id_import_batch3 );
is( $import_batch, undef, "Batch 3 has been deleted");
subtest "RecordsFromMarcPlugin" => sub {
plan tests => 5;
@ -213,4 +213,9 @@ subtest "RecordsFromMarcPlugin" => sub {
'Checked one field in second record' );
};
sub get_import_record {
my $id_import_batch = shift;
return $dbh->do('SELECT * FROM import_records WHERE import_batch_id = ?', undef, $id_import_batch);
}
$schema->storage->txn_rollback;