From 969669bb1e2cb08bbfc91334b6c52e3dd0413e11 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 17 Oct 2013 23:05:15 +0000 Subject: [PATCH] Bug 10535: (follow-up) wrap Budgets.t in transaction This patch also temporarily removes any existing budgets to avoid issues where tests can fail if there is already an active budget in the database. Signed-off-by: Galen Charlton --- t/db_dependent/Budgets.t | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t index baaa1a198a..bfb910bf63 100755 --- a/t/db_dependent/Budgets.t +++ b/t/db_dependent/Budgets.t @@ -4,9 +4,16 @@ use Test::More tests=>20; BEGIN {use_ok('C4::Budgets') } use C4::Dates; +use C4::Context; use YAML; +my $dbh = C4::Context->dbh(); +$dbh->{AutoCommit} = 0; +$dbh->{RaiseError} = 1; + +$dbh->do('DELETE FROM aqbudgetperiods'); + # # Budget Periods : # -- 2.39.5