Lines 207-215
subtest 'Shelf content' => sub {
Link Here
|
207 |
$shelf->allow_delete_own(0); |
207 |
$shelf->allow_delete_own(0); |
208 |
$shelf->store; |
208 |
$shelf->store; |
209 |
$number_of_deleted_biblios = $shelf->remove_biblios( { biblionumbers => [ $biblio2->{biblionumber} ], borrowernumber => $patron1->{borrowernumber} } ); |
209 |
$number_of_deleted_biblios = $shelf->remove_biblios( { biblionumbers => [ $biblio2->{biblionumber} ], borrowernumber => $patron1->{borrowernumber} } ); |
210 |
is( $number_of_deleted_biblios, 0, ); |
210 |
is( $number_of_deleted_biblios, 1, ); |
211 |
$number_of_contents = Koha::Virtualshelfcontents->search->count; |
211 |
$number_of_contents = Koha::Virtualshelfcontents->search->count; |
212 |
is( $number_of_contents, 1, 'The biblio should not have been deleted to the shelf by the patron, even if it is his own content (allow_delete_own=0)' ); |
212 |
is( $number_of_contents, 0, 'The biblio should have been deleted to the shelf by the patron, it is his own content (allow_delete_own=0)' ); |
|
|
213 |
$shelf->add_biblio( $biblio2->{biblionumber}, $patron1->{borrowernumber} ); |
213 |
|
214 |
|
214 |
# allow_add = 1, allow_delete_own = 1 |
215 |
# allow_add = 1, allow_delete_own = 1 |
215 |
$shelf->allow_add(1); |
216 |
$shelf->allow_add(1); |
216 |
- |
|
|