]> git.koha-community.org Git - koha.git/commit
Bug 37018: Regression tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Sat, 6 Jul 2024 13:32:07 +0000 (10:32 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 25 Jul 2024 07:58:11 +0000 (09:58 +0200)
commit3855a032d89147a01decea84623cc6ea3f3b146f
tree51a551bb9fe2d2db36c62e5b6fec722d9870350d
parentf8ed88e98ea1d4091cd8628e631285fe8b6bfcd6
Bug 37018: Regression tests

This patch adds regression tests. With the current codebase, the
malicious query returns a 200. It should be caught and a 400 needs to be
returned.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/query.t
=> FAIL: It returns a 200
3. Once the rest of the patches are ready, repeat 2
=> SUCCESS: It returns a 400

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>
t/db_dependent/api/v1/query.t