From eb501068496885059366cc85fad8abede0970b83 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Tue, 15 Nov 2016 10:30:16 +0000 Subject: [PATCH] Bug 6979 - Fix Already in a transaction error --- t/db_dependent/Auth_with_ldap.t | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Auth_with_ldap.t b/t/db_dependent/Auth_with_ldap.t index 90365c5..cf4b700 100755 --- a/t/db_dependent/Auth_with_ldap.t +++ b/t/db_dependent/Auth_with_ldap.t @@ -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; -- 2.7.4