From db82645032162f61f66daab0e1be69eca863f679 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 2 May 2016 15:41:42 +0100 Subject: [PATCH] Bug 16419: follow-up of bug 11371 - Fix t/db_dependent/Acquisition.t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests added by bug 11371 have been put after the rollback statement. Test plan: prove t/db_dependent/Acquisition.t should return green Signed-off-by: Marc VĂ©ron --- t/db_dependent/Acquisition.t | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t index 6063f09..16e0c86 100755 --- a/t/db_dependent/Acquisition.t +++ b/t/db_dependent/Acquisition.t @@ -941,16 +941,14 @@ ok(($order4->{cancellationreason} eq "foobar"), "order has cancellation reason \ ok((not defined GetBiblio($order4->{biblionumber})), "biblio does not exist anymore"); # End of tests for DelOrder -$schema->storage->txn_rollback(); # Budget reports -#my @report = GetBudgetReport(1); -#ok(@report >= 1, "GetBudgetReport OK"); - my $all_count = scalar GetBudgetsReport(); ok($all_count >= 1, "GetBudgetReport OK"); my $active_count = scalar GetBudgetsReport(1); ok($active_count >= 1 , "GetBudgetsReport(1) OK"); -ok($all_count == scalar GetBudgetsReport(), "GetBudgetReport returns inactive budget period acquisitions."); +is($all_count, scalar GetBudgetsReport(), "GetBudgetReport returns inactive budget period acquisitions."); ok($active_count >= scalar GetBudgetsReport(1), "GetBudgetReport doesn't return inactive budget period acquisitions."); + +$schema->storage->txn_rollback(); -- 1.7.10.4