Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 11; |
22 |
use Test::More tests => 12; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
24 |
|
24 |
|
25 |
use C4::Members; |
25 |
use C4::Members; |
Lines 68-73
is( Koha::Patrons->search->count, $nb_of_patrons + 2, 'The 2 patrons should have
Link Here
|
68 |
my $retrieved_patron_1 = Koha::Patrons->find( $new_patron_1->borrowernumber ); |
68 |
my $retrieved_patron_1 = Koha::Patrons->find( $new_patron_1->borrowernumber ); |
69 |
is( $retrieved_patron_1->cardnumber, $new_patron_1->cardnumber, 'Find a patron by borrowernumber should return the correct patron' ); |
69 |
is( $retrieved_patron_1->cardnumber, $new_patron_1->cardnumber, 'Find a patron by borrowernumber should return the correct patron' ); |
70 |
|
70 |
|
|
|
71 |
subtest 'library' => sub { |
72 |
plan tests => 2; |
73 |
is( $retrieved_patron_1->library->branchcode, $library->{branchcode}, 'Koha::Patron->library should return the correct library' ); |
74 |
is( ref($retrieved_patron_1->library), 'Koha::Library', 'Koha::Patron->library should return a Koha::Library object' ); |
75 |
}; |
76 |
|
71 |
subtest 'guarantees' => sub { |
77 |
subtest 'guarantees' => sub { |
72 |
plan tests => 8; |
78 |
plan tests => 8; |
73 |
my $guarantees = $new_patron_1->guarantees; |
79 |
my $guarantees = $new_patron_1->guarantees; |
74 |
- |
|
|