Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 7; |
22 |
use Test::More tests => 8; |
23 |
use Test::Exception; |
23 |
use Test::Exception; |
24 |
|
24 |
|
25 |
use C4::Circulation qw/AddIssue AddReturn/; |
25 |
use C4::Circulation qw/AddIssue AddReturn/; |
Lines 481-487
subtest 'checkout() tests' => sub {
Link Here
|
481 |
|
481 |
|
482 |
subtest "void() tests" => sub { |
482 |
subtest "void() tests" => sub { |
483 |
|
483 |
|
484 |
plan tests => 15; |
484 |
plan tests => 16; |
|
|
485 |
|
486 |
$schema->storage->txn_begin; |
485 |
|
487 |
|
486 |
# Create a borrower |
488 |
# Create a borrower |
487 |
my $categorycode = $builder->build({ source => 'Category' })->{ categorycode }; |
489 |
my $categorycode = $builder->build({ source => 'Category' })->{ categorycode }; |
Lines 544-550
subtest "void() tests" => sub {
Link Here
|
544 |
$line1->_result->discard_changes(); |
546 |
$line1->_result->discard_changes(); |
545 |
my $line1_post = $line1->unblessed(); |
547 |
my $line1_post = $line1->unblessed(); |
546 |
is( $ret, undef, 'Attempted void on non-credit returns undef' ); |
548 |
is( $ret, undef, 'Attempted void on non-credit returns undef' ); |
547 |
is_deeply( $line1_pre, $line1_post, 'Non-credit account line cannot be voided' ) |
549 |
is_deeply( $line1_pre, $line1_post, 'Non-credit account line cannot be voided' ); |
|
|
550 |
|
551 |
$schema->storage->txn_rollback; |
548 |
}; |
552 |
}; |
549 |
|
553 |
|
550 |
1; |
554 |
1; |
551 |
- |
|
|