Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 5; |
22 |
use Test::More tests => 6; |
23 |
|
23 |
|
24 |
use Koha::Checkouts; |
24 |
use Koha::Checkouts; |
25 |
use Koha::Database; |
25 |
use Koha::Database; |
Lines 86-91
subtest 'is_overdue' => sub {
Link Here
|
86 |
0, 'In Ten days, the item due yesterday will still be late' ); |
86 |
0, 'In Ten days, the item due yesterday will still be late' ); |
87 |
}; |
87 |
}; |
88 |
|
88 |
|
|
|
89 |
subtest 'item' => sub { |
90 |
plan tests => 2; |
91 |
my $item = $retrieved_checkout_1->item; |
92 |
is( ref( $item ), 'Koha::Item', 'Koha::Checkout->item should return a Koha::Item' ); |
93 |
is( $item->itemnumber, $item_1->{itemnumber}, 'Koha::Checkout->item should return the correct item' ); |
94 |
}; |
95 |
|
89 |
$retrieved_checkout_1->delete; |
96 |
$retrieved_checkout_1->delete; |
90 |
is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' ); |
97 |
is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' ); |
91 |
|
98 |
|
92 |
- |
|
|