Koha/xt
Tomas Cohen Arazi bb09e474a0 Bug 37018: Add 400 response definition to all routes
This patch adds a test for well defined 400 responses on all verbs and
paths on the API spec.

The tests verify:

* Presence of 400 response definition
* The description must start with 'Bad request' (needs coding guideline)
* If DBIC queries are allowed on the route, then `invalid_query` needs
  to be mentioned in the description.

All routes get fixed to make the tests pass.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
  k$ prove xt/api.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2024-07-23 04:42:52 +00:00
..
author Bug 31590: Remove Text::CSV::Unicode 2022-09-21 16:07:21 -03:00
api.t Bug 37018: Add 400 response definition to all routes 2024-07-23 04:42:52 +00:00
check_makefile.t Bug 34911: Test files from HEAD instead of 'master' 2023-10-05 09:38:43 -10:00
find-cud.t Bug 36176: Exclude misc/releases_notes/* 2024-03-27 13:45:17 +00:00
find-license-problems.t
find-misplaced-executables.t
find-missing-auth_checks.t Bug 24879: Exclude koha_perl_deps.pl 2024-03-26 15:58:51 +00:00
find-missing-filters.t Bug 33743: Make xt/find-missing-filters.t and xt/single_quotes.t check directories in git index only 2023-05-16 12:56:41 +02:00
single_quotes.t Bug 33743: Make xt/find-missing-filters.t and xt/single_quotes.t check directories in git index only 2023-05-16 12:56:41 +02:00
tt_valid.t
verify-debian-docbook.t
verify_bib1.att.t Bug 32741: Regression tests 2023-02-02 11:59:26 -03:00
vue_tidy.t Bug 33625: Adjust test to deal with cypress tests 2023-05-17 10:24:59 -03:00
yaml_valid.pl
yaml_valid.t