Lines 32-46
BEGIN {
Link Here
|
32 |
use_ok('C4::Barcodes'); |
32 |
use_ok('C4::Barcodes'); |
33 |
} |
33 |
} |
34 |
|
34 |
|
35 |
my $schema = Koha::Database->new->schema; |
|
|
36 |
$schema->storage->txn_begin; |
37 |
|
38 |
my $builder = t::lib::TestBuilder->new; |
35 |
my $builder = t::lib::TestBuilder->new; |
39 |
|
36 |
|
40 |
my $dbh = C4::Context->dbh; |
37 |
my $schema = Koha::Database->new->schema; |
41 |
|
38 |
|
42 |
subtest 'Test generation of annual barcodes from DB values' => sub { |
39 |
subtest 'Test generation of annual barcodes from DB values' => sub { |
43 |
|
40 |
|
|
|
41 |
$schema->storage->txn_begin; |
42 |
|
44 |
plan tests => 4; |
43 |
plan tests => 4; |
45 |
|
44 |
|
46 |
$builder->schema->resultset( 'Issue' )->delete_all; |
45 |
$builder->schema->resultset( 'Issue' )->delete_all; |
Lines 84-89
subtest 'Test generation of annual barcodes from DB values' => sub {
Link Here
|
84 |
}; |
83 |
}; |
85 |
|
84 |
|
86 |
|
85 |
|
|
|
86 |
$schema->storage->txn_begin; |
87 |
|
87 |
$builder->schema->resultset( 'Issue' )->delete_all; |
88 |
$builder->schema->resultset( 'Issue' )->delete_all; |
88 |
$builder->schema->resultset( 'Item' )->delete_all; |
89 |
$builder->schema->resultset( 'Item' )->delete_all; |
89 |
|
90 |
|
Lines 171-173
foreach $format (@formats) {
Link Here
|
171 |
} |
172 |
} |
172 |
} |
173 |
} |
173 |
} |
174 |
} |
174 |
- |
175 |
|
|
|
176 |
$schema->storage->txn_rollback; |
177 |
|