Bug 18762: Remove a warning from History.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 8 Jun 2017 18:36:40 +0000 (15:36 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 14 Jun 2017 17:36:28 +0000 (14:36 -0300)
Test plan:
  prove t/db_dependent/Search/History.t
should not display any warnings

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
t/db_dependent/Search/History.t

index 7044921..a10b5f8 100644 (file)
@@ -19,9 +19,10 @@ use List::Util qw( shuffle );
 
 use C4::Context;
 use Koha::DateUtils;
+
+my $schema = Koha::Database->new->schema;
+$schema->storage->txn_begin;
 my $dbh = C4::Context->dbh;
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
 
 use_ok('Koha::DateUtils');
 use_ok('C4::Search::History');
@@ -472,6 +473,4 @@ $result2 = $schema->resultset('SearchHistory')->search()->count;
 is($result2, $result+1, 'new search added to borrower');
 };
 
-$dbh->rollback;
-
 done_testing;