View | Details | Raw Unified | Return to bug 34415
Collapse All | Expand All

(-)a/t/db_dependent/Koha/Edifact/Transport.t (-9 / +17 lines)
Lines 9-25 use t::lib::TestBuilder; Link Here
9
9
10
use Koha::Database;
10
use Koha::Database;
11
11
12
my $schema = Koha::Database->new->schema;
12
my $schema  = Koha::Database->new->schema;
13
my $builder = t::lib::TestBuilder->new;
13
my $builder = t::lib::TestBuilder->new;
14
14
15
$schema->storage->txn_begin;
15
$schema->storage->txn_begin;
16
16
17
my $account = $builder->build({ source => 'VendorEdiAccount', value => {
17
my $account = $builder->build(
18
    description => 'test vendor', transport => 'FILE',
18
    {
19
}});
19
        source => 'VendorEdiAccount',
20
$builder->build({ source => 'EdifactMessage', value => {
20
        value  => {
21
    message_type => 'TEST', filename => 'duplicate', raw_msg => 'message_contents'
21
            description => 'test vendor', transport => 'FILE',
22
}});
22
        }
23
    }
24
);
25
$builder->build(
26
    {
27
        source => 'EdifactMessage',
28
        value  => { message_type => 'TEST', filename => 'duplicate', raw_msg => 'message_contents' }
29
    }
30
);
23
31
24
my $filename = 'QUOTES_413514.CEQ';
32
my $filename = 'QUOTES_413514.CEQ';
25
33
Lines 41-47 my $cnt = $schema->resultset('EdifactMessage')->count(); Link Here
41
is( $cnt, 2, 'unique message name ingested' );
49
is( $cnt, 2, 'unique message name ingested' );
42
50
43
# try a repeat ingest
51
# try a repeat ingest
44
warning_like {$trans->ingest( $mhash, $filename ) } qr/skipping ingest of QUOTES_413514.CEQ/, 'Warning on repeated ingest';
52
warning_like { $trans->ingest( $mhash, $filename ) } qr/skipping ingest of QUOTES_413514.CEQ/,
53
    'Warning on repeated ingest';
45
54
46
my $cnt2 = $schema->resultset('EdifactMessage')->count();
55
my $cnt2 = $schema->resultset('EdifactMessage')->count();
47
56
48
- 

Return to bug 34415