Bug 22071: Regression tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 4 Jan 2019 15:37:27 +0000 (12:37 -0300)
committerJesse Maseto <jesse@bywatersolutions.com>
Fri, 11 Jan 2019 19:32:17 +0000 (19:32 +0000)
commitbe5c32a5b59fe54f9d8f50b81e0f20e059d048f2
tree3986d68c8d3dee4d44768177e34febd4ba40ff0f
parent85374828e93d5b978cd13bbbdc583ea2a077a3b3
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>
(cherry picked from commit 2067b8e3f8cb363370897ff179bcdbf5c97cbbbb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d830a2f0973fa6ffd634a9665f93a53c325c2d7a)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
t/db_dependent/api/v1/auth_authenticate_api_request.t [new file with mode: 0755]