Koha-clms/t/Koha/REST/Plugin
Tomas Cohen Arazi 2b0bd07a2d Bug 26143: Regression tests
This patch introduces tests for the per_page=-1 handling use case. From
now on per_page=-1 means 'all resources'.

On writing this I noticed that we always paginate results no matter
what, but there was a weird condition under which on pagination headers
were sent back to the API consumer. This is highlighted in the precedent
patch, which is not the -1 situation this one tries to tackle.

Both pagination and searching are broken with per_page=-1, which is a
standard, and we actually didn't explicitly set a way to request all
resources.

To verify this:
1. Apply the previous tests patch and this one
2. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Pagination.t \
           t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Things are damn broken

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d20bc39d75)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9a4910812f)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-08-17 09:49:24 +12:00
..
Pagination.t Bug 26143: Regression tests 2020-08-17 09:49:24 +12:00
Query.t Bug 24487: Don't apply matching criteria to path parameters 2020-04-17 18:42:35 +00:00