Bug 24862: Regression tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 13 Mar 2020 14:44:03 +0000 (11:44 -0300)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Sun, 21 Jun 2020 22:01:04 +0000 (10:01 +1200)
commit8d2255bddcdfad75d8b40daf47bb24c0fd13a9ed
tree9ef590245c68833d5a773bd011aac705a51ed410
parent3a86cc90816f27c9041fe051a870c0f14276a6fe
Bug 24862: Regression tests

This patch introduces tests for the expected behaviour on API routes
that expect a logged in user, but the request is made with an anonymous
session cookie.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail because the situation is not handled correctly in
the code

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0547ad34dfe01ca7d7660df59e29bc30fdf3cf1d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
t/db_dependent/api/v1/auth_authenticate_api_request.t