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>
-use Test::More tests => 34;
+use Test::More tests => 33;
use Test::MockModule;
use Test::Warn;
use Test::MockModule;
use Test::Warn;
-use Test::More tests => 7;
+use Test::More tests => 8;
use Test::Exception;
use C4::Circulation qw/AddIssue AddReturn/;
use Test::Exception;
use C4::Circulation qw/AddIssue AddReturn/;
subtest "void() tests" => sub {
subtest "void() tests" => sub {
+ plan tests => 16;
+
+ $schema->storage->txn_begin;
# Create a borrower
my $categorycode = $builder->build({ source => 'Category' })->{ categorycode };
# Create a borrower
my $categorycode = $builder->build({ source => 'Category' })->{ categorycode };
$line1->_result->discard_changes();
my $line1_post = $line1->unblessed();
is( $ret, undef, 'Attempted void on non-credit returns undef' );
$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;