Bug 18014: General update of AuthoritiesMarc.t

Modern::Perl, Koha::Database, etc.

Test plan:
Run t/db_dependent/AuthoritiesMarc.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2017-01-31 08:59:45 +01:00 committed by Kyle M Hall
parent dbada67196
commit ac004aa63e
1 changed files with 6 additions and 5 deletions

View File

@ -3,14 +3,15 @@
# This Koha test module is a stub!
# Add more tests here!!!
use strict;
use warnings;
use Modern::Perl;
use Test::More tests => 8;
use Test::MockModule;
use Test::Warn;
use MARC::Record;
use t::lib::Mocks;
use Koha::Database;
BEGIN {
use_ok('C4::AuthoritiesMarc');
@ -57,9 +58,9 @@ $module->mock('GetAuthority', sub {
return $record;
});
my $schema = Koha::Database->new->schema;
$schema->storage->txn_begin;
my $dbh = C4::Context->dbh;
$dbh->{AutoCommit} = 0;
$dbh->{RaiseError} = 1;
t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
@ -190,4 +191,4 @@ is_deeply(
'test BuildSummary for UNIMARC'
);
$dbh->rollback;
$schema->storage->txn_rollback;