Lines 17-56
Link Here
|
17 |
# with Koha; if not, see <http://www.gnu.org/licenses>. |
17 |
# with Koha; if not, see <http://www.gnu.org/licenses>. |
18 |
|
18 |
|
19 |
use Modern::Perl; |
19 |
use Modern::Perl; |
20 |
use C4::Context; |
20 |
|
21 |
use Test::More tests => 148; |
21 |
use Test::More tests => 144; |
22 |
use Test::MockModule; |
22 |
use Test::MockModule; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
|
|
24 |
use MARC::Record; |
24 |
|
25 |
|
|
|
26 |
use Koha::Database; |
27 |
use C4::Biblio; |
28 |
use C4::OAI::Sets; |
25 |
|
29 |
|
26 |
BEGIN { |
30 |
my $schema = Koha::Database->new->schema; |
27 |
use_ok('C4::OAI::Sets'); |
31 |
$schema->storage->txn_begin; |
28 |
use_ok('MARC::Record'); |
|
|
29 |
use_ok('C4::Biblio'); |
30 |
} |
31 |
can_ok( |
32 |
'C4::OAI::Sets', qw( |
33 |
GetOAISets |
34 |
GetOAISet |
35 |
GetOAISetBySpec |
36 |
ModOAISet |
37 |
DelOAISet |
38 |
AddOAISet |
39 |
GetOAISetsMappings |
40 |
GetOAISetMappings |
41 |
ModOAISetMappings |
42 |
GetOAISetsBiblio |
43 |
DelOAISetsBiblio |
44 |
CalcOAISetsBiblio |
45 |
ModOAISetsBiblios |
46 |
UpdateOAISetsBiblio |
47 |
AddOAISetsBiblios ) |
48 |
); |
49 |
|
50 |
|
51 |
my $dbh = C4::Context->dbh; |
32 |
my $dbh = C4::Context->dbh; |
52 |
$dbh->{AutoCommit} = 0; |
33 |
|
53 |
$dbh->{RaiseError} = 1; |
|
|
54 |
$dbh->do('DELETE FROM oai_sets'); |
34 |
$dbh->do('DELETE FROM oai_sets'); |
55 |
$dbh->do('DELETE FROM oai_sets_descriptions'); |
35 |
$dbh->do('DELETE FROM oai_sets_descriptions'); |
56 |
$dbh->do('DELETE FROM oai_sets_mappings'); |
36 |
$dbh->do('DELETE FROM oai_sets_mappings'); |
Lines 632-635
sub create_helper_biblio {
Link Here
|
632 |
return $biblionumber; |
612 |
return $biblionumber; |
633 |
} |
613 |
} |
634 |
|
614 |
|
635 |
$dbh->rollback; |
615 |
$schema->storage->txn_rollback; |
636 |
- |
|
|