Tests TODO
-
Add an integration test for the customers list endpoint to validate pagination headers:
- x-page-prev is absent on first page and present on middle/last pages when applicable.
- x-page-next is present when more records exist and absent on last page.
- x-page-count, x-record-count, x-page-index, and x-page-size are always present with coherent values.
-
Add a boundary integration test for the customers list endpoint last page:
- Given a known total and page size, request the final page and assert x-page-next is absent.
- Assert x-page-prev is still present on the final page when page index is greater than 1.
- Assert x-page-count equals ceil(x-record-count / x-page-size) and x-page-index equals x-page-count.
-
Add a pagination link integrity test with query filters:
- Request a filtered list (for example using query text) and inspect x-page-next/x-page-prev when present.
- Assert pagination links preserve filter query parameters in addition to PageIndex/PageSize.
- If filters are not preserved, record expected behavior and open a follow-up implementation task.