Lines 1352-1358
subtest 'notify_library_of_registration()' => sub {
Link Here
|
1352 |
}; |
1352 |
}; |
1353 |
|
1353 |
|
1354 |
subtest 'get_savings tests' => sub { |
1354 |
subtest 'get_savings tests' => sub { |
1355 |
plan tests => 2; |
1355 |
|
|
|
1356 |
plan tests => 4; |
1356 |
|
1357 |
|
1357 |
$schema->storage->txn_begin; |
1358 |
$schema->storage->txn_begin; |
1358 |
|
1359 |
|
Lines 1365-1370
subtest 'get_savings tests' => sub {
Link Here
|
1365 |
my $item1 = $builder->build_object({ class => 'Koha::Items' }, { value => { biblionumber => $biblio1->biblionumber, replacementprice => '5.00', holdingbranch => $library->branchcode, homebranch => $library->branchcode } }); |
1366 |
my $item1 = $builder->build_object({ class => 'Koha::Items' }, { value => { biblionumber => $biblio1->biblionumber, replacementprice => '5.00', holdingbranch => $library->branchcode, homebranch => $library->branchcode } }); |
1366 |
my $item2 = $builder->build_object({ class => 'Koha::Items' }, { value => { biblionumber => $biblio1->biblionumber, replacementprice => '5.00', holdingbranch => $library->branchcode, homebranch => $library->branchcode } }); |
1367 |
my $item2 = $builder->build_object({ class => 'Koha::Items' }, { value => { biblionumber => $biblio1->biblionumber, replacementprice => '5.00', holdingbranch => $library->branchcode, homebranch => $library->branchcode } }); |
1367 |
|
1368 |
|
|
|
1369 |
is( $patron->get_savings, 0, 'No checkouts, no savings' ); |
1370 |
|
1371 |
# Add an old checkout with deleted itemnumber |
1372 |
$builder->build_object({ class => 'Koha::Old::Checkouts', value => { itemnumber => undef, borrowernumber => $patron->id } }); |
1373 |
|
1374 |
is( $patron->get_savings, 0, 'No checkouts with itemnumber, no savings' ); |
1375 |
|
1368 |
AddIssue( $patron->unblessed, $item1->barcode ); |
1376 |
AddIssue( $patron->unblessed, $item1->barcode ); |
1369 |
AddIssue( $patron->unblessed, $item2->barcode ); |
1377 |
AddIssue( $patron->unblessed, $item2->barcode ); |
1370 |
|
1378 |
|
1371 |
- |
|
|