@@ -, +, @@ after all --- Koha/Virtualshelves.pm | 17 ----------------- t/db_dependent/Virtualshelves.t | 4 ++-- 2 files changed, 2 insertions(+), 19 deletions(-) --- a/Koha/Virtualshelves.pm +++ a/Koha/Virtualshelves.pm @@ -191,23 +191,6 @@ sub get_shelves_containing_record { ); } -=head3 get_shared_shelves - -=cut - -sub get_shared_shelves { - my ( $self, $params ) = @_; - my $borrowernumber = $params->{borrowernumber} || 0; - - $self->search( - { - 'me.owner' => $borrowernumber, - 'me.shelfnumber' => { -ident => 'virtualshelfshares.shelfnumber' } - }, - { prefetch => 'virtualshelfshares' } - ); -} - =head3 _type =cut --- a/t/db_dependent/Virtualshelves.t +++ a/t/db_dependent/Virtualshelves.t @@ -497,8 +497,8 @@ subtest 'Get shelves' => sub { is( $public_shelves->count, 2, 'get_public_shelves should return all public shelves, no matter who is the owner' ); my $shared_shelf = eval { $shelf_to_share->share("valid key") }; - my $shared_shelves = Koha::Virtualshelves->get_shared_shelves({ borrowernumber => $patron1->{borrowernumber} }); - is( $shared_shelves->count, 1, 'get_shared_shelves should return shared shelves' ); + my $shared_shelves = Koha::Virtualshelfshares->search({ borrowernumber => $patron1->{borrowernumber} }); + is( $shared_shelves->count, 1, 'Found the share for patron1' ); teardown(); }; --