From: Andrew Isherwood Date: Fri, 9 Nov 2018 12:23:32 +0000 (+0000) Subject: Bug 20563: (follow-up) Add unit test X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=0c41d8631474ae3fd33a1ff904dc241c791746aa;p=koha.git Bug 20563: (follow-up) Add unit test Test that requested partners are returned in API response when requested Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- diff --git a/t/db_dependent/api/v1/illrequests.t b/t/db_dependent/api/v1/illrequests.t index bd4439de48..bc990eecf4 100644 --- a/t/db_dependent/api/v1/illrequests.t +++ b/t/db_dependent/api/v1/illrequests.t @@ -109,12 +109,13 @@ subtest 'list() tests' => sub { # One illrequest created, returned with augmented data $tx = $t->ua->build_tx( GET => - '/api/v1/illrequests?embed=patron,library,capabilities,metadata' ); + '/api/v1/illrequests?embed=patron,library,capabilities,metadata,requested_partners' ); $tx->req->cookies( { name => 'CGISESSID', value => $session_id } ); $tx->req->env( { REMOTE_ADDR => $remote_address } ); $t->request_ok($tx)->status_is(200) ->json_has( '/0/patron', 'patron embedded' ) ->json_is( '/0/patron/patron_id', $patron->borrowernumber, 'The right patron is embeded') + ->json_has( '/0/requested_partners', 'requested_partners embedded' ) ->json_has( '/0/capabilities', 'capabilities embedded' ) ->json_has( '/0/library', 'library embedded' ) ->json_has( '/0/metadata', 'metadata embedded' )