Koha-clms/t/db_dependent/Koha
Tomas Cohen Arazi 9a4910812f 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>
2020-08-13 18:11:56 +00:00
..
Account Bug 25998: Add Unit Tests 2020-07-28 14:54:29 +00:00
Acquisition Bug 24161: (follow-up) Fix failing test (when running slow) 2020-05-13 16:05:36 +01:00
Biblio Bug 22144: (QA follow-up) Prepare the ground for other formats 2019-01-30 11:50:48 +00:00
BiblioUtils Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
Cash Bug 24815: Add additional tests 2020-04-29 16:17:53 +01:00
Charges Bug 25729: Prevent Charges/Fees.t to fail on slow server 2020-07-31 20:31:51 +00:00
Checkouts Bug 24507: Make Checkouts/ReturnClaim.t pass on MySQL 8 2020-01-24 15:20:18 +00:00
Club Bug 23820: Fix Koha/Club/Hold.t 2020-07-27 16:47:38 +00:00
Config Bug 15494: (follow-up) Move yaml syspref code to its own sub in SySpref object 2018-11-07 21:39:39 +00:00
Filter Bug 23793: Unit tests 2019-10-23 17:33:09 +01:00
IssuingRules Bug 18936: Fix IssuingRules/guess_article_requestable_itemtypes.t 2020-02-04 09:56:29 +00:00
Item Bug 14334: Remove AutoCommit from tests 2018-12-14 13:42:37 +00:00
Library Bug 21082: Add new admin page for overdrive 2018-10-09 11:04:23 +00:00
Objects/Mixin Bug 23994: Fix random failure from AdditionalFields.t (U18) 2019-11-08 09:31:47 +00:00
Patron Bug 20443: Move C4::Members::AttributeTypes::GetAttributeTypes to Koha::Patron::Attribute::Types 2020-03-23 13:44:35 +00:00
Patrons Bug 18308: (RM follow-up) Fix failing tests 2020-05-05 10:49:07 +01:00
Plugins Bug 18308: (RM follow-up) Clarify intent of tests 2020-05-05 14:59:35 +01:00
REST Bug 26143: Regression tests 2020-08-13 18:11:56 +00:00
SearchEngine Bug 25864: Unit test adjustment 2020-07-21 15:11:55 +00:00
Subscription Bug 17047: SQL reports management with Mana-KB 2019-01-23 14:39:26 +00:00
Tags Bug 21846: Add Koha::Tags::Approval(s) and Koha::Tags::Index(es) 2019-03-15 12:27:44 +00:00
Template/Plugin Bug 13547: (QA follow-up) Add basic tests 2020-05-12 11:44:52 +01:00
XSLT Bug 25641: Fix Koha/XSLT/Base.t failures on U20 2020-06-16 21:37:46 +00:00
Z3950Responder Bug 25277: Unit test 2020-05-18 15:27:22 +01:00
Account.t Bug 24818: (RM follow-up) Update tests for DATE -> TIMESTAMP change 2020-03-19 13:05:58 +00:00
ActionLogs.t Bug 24329: Add a test 2020-01-08 11:05:00 +00:00
ApiKeys.t Bug 21597: Field 'description' doesn't have a default value 2018-10-18 14:18:00 +00:00
Authorities.t Bug 24823: Drop Catmandu dependency 2020-05-12 11:43:19 +01:00
Biblio.t Bug 25540: Use build_sample_item 2020-05-23 08:33:57 +01:00
BiblioFrameworks.t
…
Biblios.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
Checkouts.t Bug 21432: (bug 20899 follow-up) Fix patron's name display for deleted patrons 2018-10-03 17:18:44 +00:00
CirculationRules.t Bug 24602: Tests for get_onshlefholds_policy 2020-02-10 08:56:30 +00:00
Cities.t Bug 20144: [sql_modes] Shorten cities.city_zipcode 2018-02-13 13:58:51 -03:00
ClassSortRules.t Bug 19929: Add Koha objects for class sources and sorters 2018-03-23 11:45:38 -03:00
ClassSources.t Bug 15836: Fix failing tests 2018-11-13 18:53:10 +00:00
ClassSplitRules.t Bug 15836: Handle non-existent regexs 2018-11-13 15:18:22 +00:00
CsvProfiles.t Bug 20144: [sql_modes] Add default values for export_format columns 2018-02-13 13:58:51 -03:00
Database.t Bug 22001: Add tests 2020-03-27 08:53:02 +00:00
Desks.t Bug 13881: Add desk management 2020-03-25 09:19:15 +00:00
GetDailyQuote.t Bug 14334: Remove AutoCommit from tests 2018-12-14 13:42:37 +00:00
Holds.t Bug 24722: Add test 2020-03-17 16:48:52 +00:00
IssuingRules.t Bug 18936: (follow-up) Add cloning of circulation rules back to Koha 2020-02-04 09:56:29 +00:00
Item.t Bug 25421: Make ->pickup_locations only return an arrayref 2020-05-12 10:59:58 +01:00
ItemTypes.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Items.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
KeyboardShortcuts.t Bug 21411: (QA follow-up) fix tests 2019-05-10 18:59:39 +00:00
Libraries.t Bug 24368: Remove Koha::Libraries->pickup_locations 2020-05-13 10:30:41 +01:00
MarcSubfieldStructures.t Bug 19096: Add update DB entry to sync kohafield in all frameworks 2017-12-11 11:34:08 -03:00
News.t
…
Notices.t
…
Object.t Bug 25638: Add tests for JSON conversion vs DBD::mysql 2020-06-16 21:47:07 +00:00
Objects.t Bug 25423: (follow-up) Unit tests 2020-05-08 15:42:37 +02:00
Old.t Bug 24150: Prevent random failure comparing updated_on 2020-01-07 16:27:54 +00:00
Patron.t Bug 24379: Make login_attempts not nullable 2020-07-24 21:48:29 +00:00
Patrons.t Bug 23495: Fix if no sms provider defined 2020-04-29 16:57:06 +01:00
Ratings.t
…
Reports.t Bug 20052: (follow-up) Fix QA tool complaints and bad copy 2018-04-02 18:08:06 -03:00
Reviews.t Bug 21817: Centralize the mock of userenv from tests 2019-01-02 20:18:29 +00:00
SMS_Providers.t
…
SearchField.t Bug 20589: (RM follow-up) Fix Koha::SearchField.t 2019-10-03 14:17:32 +01:00
SharedContent.t Bug 23075: (RM follow-up) Update mock in tests 2019-11-07 07:56:17 +00:00
Statistics.t Bug 24149: Add tests 2020-01-23 10:40:24 +00:00
Subscription.t Bug 17047: add a dedicated page for Mana setup 2019-01-23 14:39:26 +00:00
Suggestion.t Bug 24419: Add Koha::Suggestion->suggester accessor 2020-01-20 16:37:22 +00:00
Suggestions.t Bug 23591: Add some useful methods to Koha::Suggestions 2020-04-14 16:36:13 +01:00
Tags.t Bug 21846: Add Koha::Tags::Approval(s) and Koha::Tags::Index(es) 2019-03-15 12:27:44 +00:00
Z3950Servers.t Bug 20047: Add Koha::Z3950Server Oject and use it to get server count 2018-04-20 13:34:41 -03:00