Bug 22511: (follow-up) Fix test plans
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 27 Mar 2019 11:52:07 +0000 (11:52 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 25 Apr 2019 11:02:14 +0000 (11:02 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

t/db_dependent/Accounts.t
t/db_dependent/Koha/Account/Lines.t

index e1ba90d..17b91cc 100644 (file)
@@ -18,7 +18,7 @@
 
 use Modern::Perl;
 
-use Test::More tests => 34;
+use Test::More tests => 33;
 use Test::MockModule;
 use Test::Warn;
 
index f0087a9..3856f6e 100755 (executable)
@@ -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;