|
Lines 3-16
Link Here
|
| 3 |
# This Koha test module is a stub! |
3 |
# This Koha test module is a stub! |
| 4 |
# Add more tests here!!! |
4 |
# Add more tests here!!! |
| 5 |
|
5 |
|
| 6 |
use strict; |
6 |
use Modern::Perl; |
| 7 |
use warnings; |
|
|
| 8 |
|
7 |
|
| 9 |
use Test::More tests => 8; |
8 |
use Test::More tests => 8; |
| 10 |
use Test::MockModule; |
9 |
use Test::MockModule; |
| 11 |
use Test::Warn; |
10 |
use Test::Warn; |
| 12 |
use MARC::Record; |
11 |
use MARC::Record; |
|
|
12 |
|
| 13 |
use t::lib::Mocks; |
13 |
use t::lib::Mocks; |
|
|
14 |
use Koha::Database; |
| 14 |
|
15 |
|
| 15 |
BEGIN { |
16 |
BEGIN { |
| 16 |
use_ok('C4::AuthoritiesMarc'); |
17 |
use_ok('C4::AuthoritiesMarc'); |
|
Lines 57-65
$module->mock('GetAuthority', sub {
Link Here
|
| 57 |
return $record; |
58 |
return $record; |
| 58 |
}); |
59 |
}); |
| 59 |
|
60 |
|
|
|
61 |
my $schema = Koha::Database->new->schema; |
| 62 |
$schema->storage->txn_begin; |
| 60 |
my $dbh = C4::Context->dbh; |
63 |
my $dbh = C4::Context->dbh; |
| 61 |
$dbh->{AutoCommit} = 0; |
|
|
| 62 |
$dbh->{RaiseError} = 1; |
| 63 |
|
64 |
|
| 64 |
t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); |
65 |
t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); |
| 65 |
|
66 |
|
|
Lines 190-193
is_deeply(
Link Here
|
| 190 |
'test BuildSummary for UNIMARC' |
191 |
'test BuildSummary for UNIMARC' |
| 191 |
); |
192 |
); |
| 192 |
|
193 |
|
| 193 |
$dbh->rollback; |
194 |
$schema->storage->txn_rollback; |
| 194 |
- |
|
|