From bd7191ff18f6e0960475a1130cb91442f265394a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 27 Mar 2019 11:52:07 +0000 Subject: [PATCH] Bug 22511: (follow-up) Fix test plans Signed-off-by: Martin Renvoize --- t/db_dependent/Accounts.t | 2 +- t/db_dependent/Koha/Account/Lines.t | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t index e1ba90d124..17b91cca9e 100644 --- a/t/db_dependent/Accounts.t +++ b/t/db_dependent/Accounts.t @@ -18,7 +18,7 @@ use Modern::Perl; -use Test::More tests => 34; +use Test::More tests => 33; use Test::MockModule; use Test::Warn; diff --git a/t/db_dependent/Koha/Account/Lines.t b/t/db_dependent/Koha/Account/Lines.t index f0087a9935..3856f6ef14 100755 --- a/t/db_dependent/Koha/Account/Lines.t +++ b/t/db_dependent/Koha/Account/Lines.t @@ -19,7 +19,7 @@ use Modern::Perl; -use Test::More tests => 7; +use Test::More tests => 8; use Test::Exception; use C4::Circulation qw/AddIssue AddReturn/; @@ -491,7 +491,9 @@ subtest 'checkout() tests' => sub { subtest "void() tests" => sub { - plan tests => 15; + plan tests => 16; + + $schema->storage->txn_begin; # Create a borrower my $categorycode = $builder->build({ source => 'Category' })->{ categorycode }; @@ -554,7 +556,9 @@ subtest "void() tests" => sub { $line1->_result->discard_changes(); my $line1_post = $line1->unblessed(); is( $ret, undef, 'Attempted void on non-credit returns undef' ); - is_deeply( $line1_pre, $line1_post, 'Non-credit account line cannot be voided' ) + is_deeply( $line1_pre, $line1_post, 'Non-credit account line cannot be voided' ); + + $schema->storage->txn_rollback; }; 1; -- 2.20.1