use Test::More tests => 10;
use C4::Context;
+use Koha::Database;
use Koha::DateUtils;
use t::lib::Mocks qw/mock_preference/; # to mock CronjobLog
my $success;
# Make sure we can rollback.
+my $schema = Koha::Database->new->schema;
+$schema->storage->txn_begin;
my $dbh = C4::Context->dbh;
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
eval {
# FIXME: are we sure there is an member number 1?
logaction( "MEMBERS", "MODIFY", 1, 'test info', 'sip');
$logs = GetLogs();
is( @{$logs}[0]->{ interface }, 'sip', 'Passed interface is respected (sip)');
-
- $dbh->rollback;
};
subtest 'GetLogs() respects interface filters' => sub {
$logs = GetLogs(undef,undef,undef,undef,undef,undef,undef,['commandline']);
is( @{$logs}[0]->{ interface }, 'commandline', 'Interface correctly filtered (commandline)');
-
- $dbh->rollback;
};
-$dbh->rollback;
+$schema->storage->txn_rollback;