|
Lines 1362-1370
subtest 'get_savings tests' => sub {
Link Here
|
| 1362 |
|
1362 |
|
| 1363 |
t::lib::Mocks::mock_userenv({ patron => $patron, branchcode => $library->branchcode }); |
1363 |
t::lib::Mocks::mock_userenv({ patron => $patron, branchcode => $library->branchcode }); |
| 1364 |
|
1364 |
|
| 1365 |
my $biblio1 = $builder->build_object({ class => 'Koha::Biblios' }); |
1365 |
my $biblio = $builder->build_sample_biblio; |
| 1366 |
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_sample_item( |
| 1367 |
my $item2 = $builder->build_object({ class => 'Koha::Items' }, { value => { biblionumber => $biblio1->biblionumber, replacementprice => '5.00', holdingbranch => $library->branchcode, homebranch => $library->branchcode } }); |
1367 |
{ |
|
|
1368 |
biblionumber => $biblio->biblionumber, |
| 1369 |
library => $library->branchcode, |
| 1370 |
replacementprice => rand(20), |
| 1371 |
} |
| 1372 |
); |
| 1373 |
my $item2 = $builder->build_sample_item( |
| 1374 |
{ |
| 1375 |
biblionumber => $biblio->biblionumber, |
| 1376 |
library => $library->branchcode, |
| 1377 |
replacementprice => rand(20), |
| 1378 |
} |
| 1379 |
); |
| 1368 |
|
1380 |
|
| 1369 |
is( $patron->get_savings, 0, 'No checkouts, no savings' ); |
1381 |
is( $patron->get_savings, 0, 'No checkouts, no savings' ); |
| 1370 |
|
1382 |
|
| 1371 |
- |
|
|