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 Koha::Checkouts; |
24 |
use Koha::Checkouts; |
25 |
use Koha::Database; |
25 |
use Koha::Database; |
Lines 93-98
subtest 'item' => sub {
Link Here
|
93 |
is( $item->itemnumber, $item_1->{itemnumber}, 'Koha::Checkout->item should return the correct item' ); |
93 |
is( $item->itemnumber, $item_1->{itemnumber}, 'Koha::Checkout->item should return the correct item' ); |
94 |
}; |
94 |
}; |
95 |
|
95 |
|
|
|
96 |
subtest 'patron' => sub { |
97 |
plan tests => 2; |
98 |
my $p = $new_checkout_1->patron; |
99 |
is( ref($p), 'Koha::Patron', 'Koha::Checkout->patron should return a Koha::Patron' ); |
100 |
is( $p->borrowernumber, $patron->{borrowernumber}, 'Koha::Checkout->patron should return the correct patron' ); |
101 |
}; |
102 |
|
96 |
$retrieved_checkout_1->delete; |
103 |
$retrieved_checkout_1->delete; |
97 |
is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' ); |
104 |
is( Koha::Checkouts->search->count, $nb_of_checkouts + 1, 'Delete should have deleted the checkout' ); |
98 |
|
105 |
|
99 |
- |
|
|