Koha-clms/t/db_dependent/Koha/REST/Plugin
Tomás Cohen Arazi 811e57c441
Bug 43241: Add tests for datetime/boolean fixup inside DBIC operators
This patch adds regression tests proving that RFC3339 datetime values
and boolean values nested inside DBIC operators (-and, -or, -between)
in q= queries are not converted to their DB-native format.

Unit tests (Query.t):
- Datetime: >=, <=, range, -or, -between, nested -and/-or, me. prefix
- Boolean: true/false inside -and, -or, nested -and within -or
- Non-datetime values pass through unchanged

Integration tests (Objects.t):
- Full API stack tests using action_logs with controlled data
- Same operator/nesting coverage as unit tests

Test plan:
1. Apply patch
2. Run:
   $ prove t/Koha/REST/Plugin/Query.t
   $ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests fail! Values inside -and are not converted
3. Sign off :-D

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-28 16:36:35 +00:00
..
Auth Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
Objects.t Bug 43241: Add tests for datetime/boolean fixup inside DBIC operators 2026-08-28 16:36:35 +00:00
Pagination.t Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
PluginRoutes.t Bug 42430: (QA follow-up) Fix nested plugin package corruption on reload 2026-07-13 15:46:23 +00:00