Tomas Cohen Arazi
024a32ca80
This patch introduces tests for the behaviour change (400 => 404) and also adds tests for untested (error) behaviours. Notably, the 'Biblio not found' problematic return value couldn't be triggered, because the OpenAPI plugin returns a 500 because the response was malformed (expected { error => 'message' } and it was returning a string). For the above reason, running the regression tests will show a 500... instead of the expected 400. I covered the rest of the codepaths that trigger errors to have full coverage. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/clubs_holds.t => FAIL: Tests fail loudly Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
.. | ||
acquisitions_funds.t | ||
acquisitions_orders.t | ||
acquisitions_vendors.t | ||
advanced_editor_macros.t | ||
auth.t | ||
auth_authenticate_api_request.t | ||
auth_basic.t | ||
biblios.t | ||
cashups.t | ||
checkouts.t | ||
cities.t | ||
clubs_holds.t | ||
holds.t | ||
illrequests.t | ||
import_batch_profiles.t | ||
items.t | ||
libraries.t | ||
oauth.t | ||
patrons.t | ||
patrons_accounts.t | ||
patrons_password.t | ||
return_claims.t | ||
smtp_servers.t | ||
stockrotationstage.t |