Lines 19-25
use Modern::Perl;
Link Here
|
19 |
|
19 |
|
20 |
use t::lib::TestBuilder; |
20 |
use t::lib::TestBuilder; |
21 |
|
21 |
|
22 |
use Test::More tests => 56; |
22 |
use Test::More tests => 64; |
23 |
use Test::Mojo; |
23 |
use Test::Mojo; |
24 |
|
24 |
|
25 |
use C4::Auth; |
25 |
use C4::Auth; |
Lines 93-99
$tx->req->cookies({name => 'CGISESSID', value => $session->id});
Link Here
|
93 |
$tx->req->env({REMOTE_ADDR => '127.0.0.1'}); |
93 |
$tx->req->env({REMOTE_ADDR => '127.0.0.1'}); |
94 |
$t->request_ok($tx) |
94 |
$t->request_ok($tx) |
95 |
->status_is(200); |
95 |
->status_is(200); |
96 |
ok(@{$tx->res->json} == 0, 'Json response yields no results when params doesnt match'); |
96 |
ok(@{$tx->res->json} == 0, "Json response yields no results when params doesn't match"); |
97 |
|
97 |
|
98 |
$tx = $t->ua->build_tx(GET => '/api/v1/patrons' => form => {surname => $patron->{ surname }}); |
98 |
$tx = $t->ua->build_tx(GET => '/api/v1/patrons' => form => {surname => $patron->{ surname }}); |
99 |
$tx->req->cookies({name => 'CGISESSID', value => $session->id}); |
99 |
$tx->req->cookies({name => 'CGISESSID', value => $session->id}); |
100 |
- |
|
|