Koha/t/db_dependent/api/v1
Tomas Cohen Arazi a8579ac6c4 Bug 20624: (QA follow-up) Unit tests for missing deps situation
This patch tests the situation in which Net::OAuth2::AuthorizationServer
is missing. It mocks Module::Load::Conditional::can_load and expects the
/token endpoint answers 'Unimplemented grant type' to all requests, and
the 'authenticate_api_request' in 'under' exit with unauthorized (403)
to requests in which the Authorization header is passed containing a
Bearer token, but OAuth2 is not really available.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/oauth.t
=> FAIL: Tests fail because our REST endpoints don't support this
behaviour.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-09 12:56:02 -03:00
..
acquisitions_vendors.t Bug 18120: /acquisitions/vendors unit tests 2017-09-29 17:13:13 -03:00
auth.t Bug 18137: (QA followup) Make sure the session exists and is expired on expiration tests 2017-09-21 11:27:05 -03:00
cities.t Bug 20004: Unit tests 2018-02-16 17:53:41 -03:00
holds.t Bug 20167: Regression test 2018-03-15 08:24:00 +00:00
illrequests.t Bug 7317: (QA followup) Rename 'branch' for 'library' 2017-11-09 11:42:16 -03:00
oauth.t Bug 20624: (QA follow-up) Unit tests for missing deps situation 2018-05-09 12:56:02 -03:00
patrons.t Bug 19784: Unit tests for /api/v1/patrons 2018-03-29 11:42:07 -03:00