|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 20; |
20 |
use Test::More tests => 21; |
| 21 |
use Test::Mojo; |
21 |
use Test::Mojo; |
| 22 |
use t::lib::TestBuilder; |
22 |
use t::lib::TestBuilder; |
| 23 |
|
23 |
|
|
Lines 52-58
my $borrower = $builder->build({
Link Here
|
| 52 |
branchcode => $branchcode, |
52 |
branchcode => $branchcode, |
| 53 |
categorycode => $categorycode, |
53 |
categorycode => $categorycode, |
| 54 |
flags => 0, |
54 |
flags => 0, |
| 55 |
guarantorid => $guarantor->{borrowernumber}, |
55 |
lost => 1, |
|
|
56 |
guarantorid => $guarantor->{borrowernumber}, |
| 56 |
} |
57 |
} |
| 57 |
}); |
58 |
}); |
| 58 |
|
59 |
|
|
Lines 127-132
$tx->req->cookies({name => 'CGISESSID', value => $session->id});
Link Here
|
| 127 |
$t->request_ok($tx) |
128 |
$t->request_ok($tx) |
| 128 |
->status_is(200) |
129 |
->status_is(200) |
| 129 |
->json_is('/borrowernumber' => $borrower->{ borrowernumber }) |
130 |
->json_is('/borrowernumber' => $borrower->{ borrowernumber }) |
| 130 |
->json_is('/surname' => $borrower->{ surname }); |
131 |
->json_is('/surname' => $borrower->{ surname }) |
|
|
132 |
->json_is('/lost' => 1 ); |
| 131 |
|
133 |
|
| 132 |
$dbh->rollback; |
134 |
$dbh->rollback; |
| 133 |
- |
|
|