Lines 175-187
my $id_import_batch3 = C4::ImportBatch::AddImportBatch($sample_import_batch3);
Link Here
|
175 |
|
175 |
|
176 |
# Test CleanBatch |
176 |
# Test CleanBatch |
177 |
C4::ImportBatch::CleanBatch( $id_import_batch3 ); |
177 |
C4::ImportBatch::CleanBatch( $id_import_batch3 ); |
178 |
my $batch3_clean = $dbh->do('SELECT * FROM import_records WHERE import_batch_id = "$id_import_batch3"'); |
178 |
my $import_record = get_import_record( $id_import_batch3 ); |
179 |
is( $batch3_clean, "0E0", "Batch 3 has been cleaned" ); |
179 |
is( $import_record, "0E0", "Batch 3 has been cleaned" ); |
180 |
|
180 |
|
181 |
# Test DeleteBatch |
181 |
# Test DeleteBatch |
182 |
C4::ImportBatch::DeleteBatch( $id_import_batch3 ); |
182 |
C4::ImportBatch::DeleteBatch( $id_import_batch3 ); |
183 |
my $batch3_results = $dbh->do('SELECT * FROM import_batches WHERE import_batch_id = "$id_import_batch3"'); |
183 |
my $import_batch = C4::ImportBatch::GetImportBatch( $id_import_batch3 ); |
184 |
is( $batch3_results, "0E0", "Batch 3 has been deleted"); |
184 |
is( $import_batch, undef, "Batch 3 has been deleted"); |
185 |
|
185 |
|
186 |
subtest "RecordsFromMarcPlugin" => sub { |
186 |
subtest "RecordsFromMarcPlugin" => sub { |
187 |
plan tests => 5; |
187 |
plan tests => 5; |
Lines 214-217
subtest "RecordsFromMarcPlugin" => sub {
Link Here
|
214 |
'Checked one field in second record' ); |
214 |
'Checked one field in second record' ); |
215 |
}; |
215 |
}; |
216 |
|
216 |
|
|
|
217 |
sub get_import_record { |
218 |
my $id_import_batch = shift; |
219 |
return $dbh->do('SELECT * FROM import_records WHERE import_batch_id = ?', undef, $id_import_batch); |
220 |
} |
221 |
|
217 |
$schema->storage->txn_rollback; |
222 |
$schema->storage->txn_rollback; |
218 |
- |
|
|