]> git.koha-community.org Git - koha.git/commit
Bug 27593: Regression tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 2 Feb 2021 14:18:27 +0000 (11:18 -0300)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Fri, 5 Mar 2021 17:15:09 +0000 (17:15 +0000)
commitd7bec9181e59a5cf92f22feb421a72ac23ac9eef
tree8e2a5b02d3db1a6ed65d814f6af444d1722b6001
parent87bc9f7eb2d721c53ce512134acbff90d82904e9
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 024a32ca807bb69b3d46136421dce871ba0bddbf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e950abb5352aa29d91de47a40f67067d237836fb)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
t/db_dependent/api/v1/clubs_holds.t