Koha-clms/t/db_dependent/api/v1
Tomas Cohen Arazi d7bec9181e Bug 27593: Regression tests
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>
(cherry picked from commit 024a32ca80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e950abb535)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-03-05 17:15:09 +00:00
..
acquisitions_funds.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
acquisitions_orders.t Bug 25638: Make the tests pass - ignoring the actual issue 2020-06-16 21:48:51 +00:00
acquisitions_vendors.t Bug 25048: Regression tests 2020-04-29 16:24:37 +01:00
advanced_editor_macros.t Bug 25502: Adapt Advanced macros routes to current guidelines 2020-05-19 15:21:16 +01:00
auth.t Bug 25327: Regression tests 2020-05-11 10:02:29 +01:00
auth_authenticate_api_request.t Bug 24003: Regression tests 2020-06-17 21:32:15 +00:00
auth_basic.t Bug 24003: Regression tests 2020-06-17 21:32:15 +00:00
biblios.t Bug 24908: Unit tests 2020-04-29 17:13:30 +01:00
checkouts.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
cities.t Bug 25048: Regression tests 2020-04-29 16:24:37 +01:00
clubs_holds.t Bug 27593: Regression tests 2021-03-05 17:15:09 +00:00
holds.t Bug 26181: Regression tests 2021-02-22 22:48:34 +00:00
illrequests.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
items.t Bug 24229: Avoid fetching ALL items in test 2020-05-22 09:33:18 +01:00
libraries.t Bug 25570: (follow-up) Fix tests 2020-07-10 15:43:34 +00:00
oauth.t Bug 25623: Make sure oauth.t rolls back the db 2020-06-17 22:55:22 +00:00
patrons.t Bug 14708: (QA follow-up) Add tests 2020-12-09 21:39:45 +00:00
patrons_accounts.t Bug 26271: Add failing test to reveal issue with patrons API endpoint 2020-09-14 21:35:17 +00:00
patrons_password.t Bug 22522: Fix several REST API tests 2020-02-25 13:44:22 +00:00
return_claims.t Bug 27004: Prevent claim resolution to fail 2021-01-05 17:49:38 +00:00
stockrotationstage.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00