Koha/t/db_dependent/api/v1
Tomas Cohen Arazi 531d03e811
Bug 31795: (QA follow-up) Use x-koha-override header
Despite its title, this patch does a couple more things.

1. The tests are rewritten to cover more things, and also to avoid
   deleting all authorities inside the transaction. It is really not
   required.
2. It makes the endpoint rely on the already generically implemented
   x-koha-override header, which is intended for the same use case as
   x-confirm-not-duplicate is for.
3. It changes the return codes to match the coding guidelines [1]
4. Only checks for duplicates if no override passed.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/authorities.t
=> SUCCESS: Tests pass!
2. Apply this follow-up
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

[1] https://wiki.koha-community.org/wiki/Coding_Guidelines_-_API#SWAGGER3.2.1_POST

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-05 10:18:43 -03:00
..
acquisitions_baskets.t
acquisitions_funds.t
acquisitions_orders.t
acquisitions_vendors.t
advanced_editor_macros.t
article_requests.t
auth.t
auth_authenticate_api_request.t
auth_basic.t
authorised_values.t
authorities.t Bug 31795: (QA follow-up) Use x-koha-override header 2023-05-05 10:18:43 -03:00
biblios.t Bug 33329: Regression tests 2023-05-05 10:18:38 -03:00
cashups.t
checkouts.t
cities.t
clubs_holds.t
erm_agreements.t
erm_documents.t
erm_eholdings_packages.t
erm_eholdings_resources.t
erm_eholdings_titles.t
erm_licenses.t
erm_users.t
holds.t
idp.t
ill_backends.t Bug 22440: Move backend statuses api endpoint 2023-05-05 09:13:43 -03:00
ill_requests.t Bug 22440: Tests 2023-05-05 09:13:43 -03:00
import_batch_profiles.t
import_record_matches.t
item_groups.t
items.t
jobs.t
libraries.t
oauth.t
pagination.t
password_validation.t
patrons.t
patrons_accounts.t
patrons_extended_attributes.t
patrons_holds.t
patrons_password.t
patrons_password_expiration.t
query.t
return_claims.t
search_filters.t
smtp_servers.t
stockrotationstage.t
suggestions.t
ticket_updates.t
tickets.t
transfer_limits.t
two_factor_auth.t
unhandled_exceptions.t