Lines 14-20
my $builder = t::lib::TestBuilder->new;
Link Here
|
14 |
|
14 |
|
15 |
$schema->storage->txn_begin; |
15 |
$schema->storage->txn_begin; |
16 |
|
16 |
|
17 |
my $account = $builder->build( |
17 |
my $initial_cnt = $schema->resultset('EdifactMessage')->count(); |
|
|
18 |
my $account = $builder->build( |
18 |
{ |
19 |
{ |
19 |
source => 'VendorEdiAccount', |
20 |
source => 'VendorEdiAccount', |
20 |
value => { |
21 |
value => { |
Lines 46-52
$trans->ingest( $mhash, $filename );
Link Here
|
46 |
|
47 |
|
47 |
my $cnt = $schema->resultset('EdifactMessage')->count(); |
48 |
my $cnt = $schema->resultset('EdifactMessage')->count(); |
48 |
|
49 |
|
49 |
is( $cnt, 2, 'unique message name ingested' ); |
50 |
is( $cnt, $initial_cnt + 2, 'unique message name ingested' ); |
50 |
|
51 |
|
51 |
# try a repeat ingest |
52 |
# try a repeat ingest |
52 |
warning_like { $trans->ingest( $mhash, $filename ) } qr/skipping ingest of QUOTES_413514.CEQ/, |
53 |
warning_like { $trans->ingest( $mhash, $filename ) } qr/skipping ingest of QUOTES_413514.CEQ/, |
Lines 54-59
warning_like { $trans->ingest( $mhash, $filename ) } qr/skipping ingest of QUOTE
Link Here
|
54 |
|
55 |
|
55 |
my $cnt2 = $schema->resultset('EdifactMessage')->count(); |
56 |
my $cnt2 = $schema->resultset('EdifactMessage')->count(); |
56 |
|
57 |
|
57 |
is( $cnt2, 2, 'duplicate message name not ingested' ); |
58 |
is( $cnt2, $cnt, 'duplicate message name not ingested' ); |
58 |
|
59 |
|
59 |
$schema->storage->txn_rollback; |
60 |
$schema->storage->txn_rollback; |