use C4::Context;
-my $dbh = C4::Context->dbh;
+use Koha::Patrons;
-# Start transaction
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
+my $schema = Koha::Database->new->schema;
+$schema->storage->txn_begin;
my $builder = t::lib::TestBuilder->new();
plan tests => 4;
+ my $dbh = C4::Context->dbh;
## Connection fail tests
$desired_connection_result = 'error';
warning_is {
$update = 0;
$desired_count_result = 0; # user auth problem
- C4::Members::DelMember( $borrower->{borrowernumber} );
+ Koha::Patrons->find( $borrower->{borrowernumber} )->delete;
reload_ldap_module();
is(
C4::Auth_with_ldap::checkpw_ldap( $dbh, 'hola', password => 'hey' ),
return;
}
-$dbh->rollback;
+$schema->storage->txn_rollback;
1;