1 package KohaTest::ImportBatch::getImportBatch;
2 use base qw( KohaTest::ImportBatch );
14 =head3 add_one_and_find_it
18 sub add_one_and_find_it : Test( 7 ) {
22 overlay_action => 'create_new',
23 import_status => 'staging',
24 batch_type => 'batch',
26 comments => 'inserted during automated testing',
28 my $batch_id = AddImportBatch(
29 $batch->{'overlay_action'},
30 $batch->{'import_status'},
31 $batch->{'batch_type'},
32 $batch->{'file_name'},
35 ok( $batch_id, "successfully inserted batch: $batch_id" );
37 my $retrieved = GetImportBatch( $batch_id );
39 foreach my $key ( keys %$batch ) {
40 is( $retrieved->{$key}, $batch->{$key}, "both objects agree on $key" );
42 is( $retrieved->{'import_batch_id'}, $batch_id, 'batch_id' );