return $self->{_holding_branch};
}
+=head3 biblio
+
+my $biblio = $item->biblio;
+
+Return the bibliographic record of this item
+
+=cut
+
+sub biblio {
+ my ( $self ) = @_;
+ my $biblio_rs = $self->_result->biblio;
+ return Koha::Biblio->_new_from_dbic( $self->_result->biblio );
+}
+
=head3 get_transfer
my $transfer = $item->get_transfer;
use Modern::Perl;
-use Test::More tests => 5;
+use Test::More tests => 6;
use C4::Circulation;
use Koha::Item;
is( $transfer->itemnumber, $new_item_1->itemnumber, 'Koha::Item->get_transfer should return a valid Koha::Item::Transfers object' );
};
+subtest 'biblio' => sub {
+ plan tests => 2;
+
+ my $biblio = $retrieved_item_1->biblio;
+ is( ref( $biblio ), 'Koha::Biblio', 'Koha::Item->bilio should return a Koha::Biblio' );
+ is( $biblio->biblionumber, $retrieved_item_1->biblionumber, 'Koha::Item->biblio should return the correct biblio' );
+};
+
$retrieved_item_1->delete;
is( Koha::Items->search->count, $nb_of_items + 1, 'Delete should have deleted the item' );