|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 15; |
20 |
use Test::More tests => 13; |
| 21 |
use Test::Warn; |
21 |
use Test::Warn; |
| 22 |
|
22 |
|
| 23 |
use C4::Context; |
23 |
use C4::Context; |
|
Lines 44-66
$object->surname("Test Surname");
Link Here
|
| 44 |
$object->store(); |
44 |
$object->store(); |
| 45 |
|
45 |
|
| 46 |
is( $object->in_storage, 1, "Object is now stored" ); |
46 |
is( $object->in_storage, 1, "Object is now stored" ); |
| 47 |
my $guarantee1 = Koha::Patron->new( |
|
|
| 48 |
{ |
| 49 |
categorycode => $categorycode, |
| 50 |
branchcode => $branchcode, |
| 51 |
guarantorid => $object->id |
| 52 |
} |
| 53 |
)->store(); |
| 54 |
my $guarantee2 = Koha::Patron->new( |
| 55 |
{ |
| 56 |
categorycode => $categorycode, |
| 57 |
branchcode => $branchcode, |
| 58 |
guarantorid => $object->id |
| 59 |
} |
| 60 |
)->store(); |
| 61 |
my @guarantees = $object->guarantees(); |
| 62 |
is( $guarantees[0]->id, $guarantee1->id, "First guarantee matchs" ); |
| 63 |
is( $guarantees[1]->id, $guarantee2->id, "Second guarantee matchs" ); |
| 64 |
|
47 |
|
| 65 |
my $borrowernumber = $object->borrowernumber; |
48 |
my $borrowernumber = $object->borrowernumber; |
| 66 |
|
49 |
|
| 67 |
- |
|
|