Bug 17829: Execute rollingloans tests in a transaction
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 26 Jul 2017 19:39:17 +0000 (16:39 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 26 Jul 2017 19:39:17 +0000 (16:39 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/rollingloans.t

index 6be2110..75ec17f 100644 (file)
@@ -1,7 +1,5 @@
 
-use strict;
-use warnings;
-use 5.010;
+use Modern::Perl;
 use C4::Context;
 use C4::Circulation;
 use C4::Members;
@@ -11,6 +9,10 @@ use Koha::Patrons;
 use t::lib::TestBuilder;
 
 use Test::More tests => 8;
+
+my $schema = Koha::Database->new->schema;
+$schema->storage->txn_begin;
+
 C4::Context->_new_userenv(1234567);
 C4::Context->set_userenv(91, 'CLIstaff', '23529001223661', 'CPL',
                          'CPL', 'CPL', '', 'cc@cscnet.co.uk');