Bug 6979 - Fix Already in a transaction error

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Alex Arnaud 2016-11-15 10:30:16 +00:00 committed by Kyle M Hall
parent 6ddf51573d
commit 443b2ef4f4

View file

@ -31,8 +31,7 @@ use Koha::Patrons;
my $dbh = '';
# Start transaction
my $database = Koha::Database->new();
my $schema = $database->schema();
my $schema = Koha::Database->new->schema;
$schema->storage->txn_begin();
my $builder = t::lib::TestBuilder->new();
@ -405,7 +404,7 @@ sub mock_net_ldap {
'search',
sub {
$remaining_entry = 1
$remaining_entry = 1;
return mock_net_ldap_search(
{
@ -502,6 +501,6 @@ sub is_admin_bind {
return 0;
}
$schema->storage->txn_rollback;
$schema->storage->txn_rollback();
1;