|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 6; |
22 |
use Test::More tests => 7; |
| 23 |
|
23 |
|
| 24 |
use C4::Circulation; |
24 |
use C4::Circulation; |
| 25 |
use Koha::Item; |
25 |
use Koha::Item; |
|
Lines 78-87
subtest 'biblio' => sub {
Link Here
|
| 78 |
plan tests => 2; |
78 |
plan tests => 2; |
| 79 |
|
79 |
|
| 80 |
my $biblio = $retrieved_item_1->biblio; |
80 |
my $biblio = $retrieved_item_1->biblio; |
| 81 |
is( ref( $biblio ), 'Koha::Biblio', 'Koha::Item->bilio should return a Koha::Biblio' ); |
81 |
is( ref( $biblio ), 'Koha::Biblio', 'Koha::Item->biblio should return a Koha::Biblio' ); |
| 82 |
is( $biblio->biblionumber, $retrieved_item_1->biblionumber, 'Koha::Item->biblio should return the correct biblio' ); |
82 |
is( $biblio->biblionumber, $retrieved_item_1->biblionumber, 'Koha::Item->biblio should return the correct biblio' ); |
| 83 |
}; |
83 |
}; |
| 84 |
|
84 |
|
|
|
85 |
subtest 'biblioitem' => sub { |
| 86 |
plan tests => 2; |
| 87 |
|
| 88 |
my $biblioitem = $retrieved_item_1->biblioitem; |
| 89 |
is( ref( $biblioitem ), 'Koha::Biblioitem', 'Koha::Item->biblioitem should return a Koha::Biblioitem' ); |
| 90 |
is( $biblioitem->biblionumber, $retrieved_item_1->biblionumber, 'Koha::Item->biblioitem should return the correct biblioitem' ); |
| 91 |
}; |
| 92 |
|
| 85 |
$retrieved_item_1->delete; |
93 |
$retrieved_item_1->delete; |
| 86 |
is( Koha::Items->search->count, $nb_of_items + 1, 'Delete should have deleted the item' ); |
94 |
is( Koha::Items->search->count, $nb_of_items + 1, 'Delete should have deleted the item' ); |
| 87 |
|
95 |
|
| 88 |
- |
|
|