Bug 22071: Regression tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 4 Jan 2019 15:37:27 +0000 (12:37 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 4 Jan 2019 03:13:39 +0000 (03:13 +0000)
commit2067b8e3f8cb363370897ff179bcdbf5c97cbbbb
tree50d767a5fabb84f3a4f38a93d99ed12b468f4c38
parent8009a8f462b05c2885fa4126dcba2ef0185f54f2
Bug 22071: Regression tests

The authenticate_api_request() behaviour needs more tests. This patch
adds tests for the stashed Koha::Patron object. It highlights the bug in
the OAuth authentication case.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail in the OAuth case, pass in the cookie-based auth
case.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
t/db_dependent/api/v1/auth_authenticate_api_request.t [new file with mode: 0755]