|
Lines 38-47
subtest 'Test StoreLastBorrower' => sub {
Link Here
|
| 38 |
|
38 |
|
| 39 |
t::lib::Mocks::mock_preference( 'StoreLastBorrower', '1' ); |
39 |
t::lib::Mocks::mock_preference( 'StoreLastBorrower', '1' ); |
| 40 |
|
40 |
|
| 41 |
my $patron = $builder->build( |
41 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
|
|
42 |
my $patron = $builder->build( |
| 42 |
{ |
43 |
{ |
| 43 |
source => 'Borrower', |
44 |
source => 'Borrower', |
| 44 |
value => { privacy => 1, } |
45 |
value => { privacy => 1, branchcode => $library->branchcode } |
| 45 |
} |
46 |
} |
| 46 |
); |
47 |
); |
| 47 |
|
48 |
|
|
Lines 57-62
subtest 'Test StoreLastBorrower' => sub {
Link Here
|
| 57 |
} |
58 |
} |
| 58 |
); |
59 |
); |
| 59 |
|
60 |
|
|
|
61 |
t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } ); |
| 62 |
|
| 60 |
$item = $item->get_from_storage; |
63 |
$item = $item->get_from_storage; |
| 61 |
my $patron_object = $item->last_returned_by(); |
64 |
my $patron_object = $item->last_returned_by(); |
| 62 |
is( $patron_object, undef, 'Koha::Item::last_returned_by returned undef' ); |
65 |
is( $patron_object, undef, 'Koha::Item::last_returned_by returned undef' ); |
| 63 |
- |
|
|