Koha-clms/t/Koha
Tomas Cohen Arazi ad83d2e07d
Bug 33080: Allow pagination to be built from stashed values
The way the old `objects.search` was build implied several totals were
calculated there, and passed to the `$c->add_pagination_headers` helper.

With the introduction of `objects.search_rs` and the ability of doing
things to the resultset afterwards, it felt like out of place to have
the pagination headers be implicitly set inside `objects.search_rs`.

This patch makes the search_rs stash some required values (from the original request) and
makes `add_pagination_headers` accept those values. This way other
callers can still build their own pagination values, while allowing this
simplified implementation.

Full-stack tests still pass, and the helper tests are moved to the
`db_dependent` section and are now more meaningful as well

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
   $ prove t/db_dependent/Koha/REST/Plugin/Pagination.t \
           t/db_dependent/api/v1/
=> SUCCESS: Tests pass! Nothing broken!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-10 12:04:06 -03:00
..
Auth Bug 20256: Add unit tests 2023-02-02 11:59:26 -03:00
Authority Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Database Bug 29695: Add new module Koha::Database::Columns 2022-04-12 11:40:16 +02:00
I18N/po/xx_XX/LC_MESSAGES Bug 29695: Add new module Koha::Database::Columns 2022-04-12 11:40:16 +02:00
Middleware Bug 28200: Remove unit test using abbreviated format 2021-05-17 12:29:14 +02:00
Object Bug 29857: (follow-up) Fix t/Koha/Object/Message.t 2022-03-02 09:40:05 -10:00
Plugins Bug 29857: (follow-up) Fix t/Koha/Plugins/Tab.t 2022-03-02 09:40:05 -10:00
REST/Plugin Bug 33080: Allow pagination to be built from stashed values 2023-03-10 12:04:06 -03:00
Result Bug 29746: (it-doesn't-hurt follow-up) More tests 2022-01-05 13:33:46 -10:00
SearchEngine Bug 31106: Unit tests 2022-07-18 14:37:35 -03:00
Util Bug 30678: (follow-up) Add oclc_number routine and friends 2022-07-22 14:58:11 -03:00
Config.t Bug 28998: Add encryption_key to the config file 2022-05-04 05:18:31 -10:00
Email.t Bug 29857: (follow-up) Fix t/Koha/Email.t 2022-03-02 09:40:05 -10:00
Exceptions.t Bug 29857: Unit tests 2022-03-01 22:47:47 -10:00
I18N.t Bug 15395: Allow correct handling of plural translation 2018-11-08 15:55:50 +00:00
ItemType.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
RDF.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Script.t Bug 24786: Fix Script_cron.t and t/Koha/Script.t 2020-11-06 17:04:31 +01:00
Script_cron.t Bug 24786: Fix Script_cron.t and t/Koha/Script.t 2020-11-06 17:04:31 +01:00
Z3950responder.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
sleep.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
wait.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00