]> git.koha-community.org Git - koha.git/commit
Bug 28787: Fix misleading tests in two_factor_auth.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 26 Jul 2022 09:43:36 +0000 (11:43 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 9 Aug 2022 16:38:46 +0000 (13:38 -0300)
commit2f71ac6f77991e8356c8b1038b38dbf2b84ac894
tree4a10095271190a39fd0699b29f945896b5ac9fe8
parent12305c89d745cfb4d02b7a8600c4550b83465eec
Bug 28787: Fix misleading tests in two_factor_auth.t

We were having a "Patron is not authenticated yet" comment, but it was not correct,
we set 'number' and 'id' in session, and waiting-for-2FA was not set => the patron is fully authenticated.
The test returned 401 because we fully authenticated user cannot request
an otp token when not waiting for the second auth step.

This situation is already covered (last test of the subtest).

Test plan:
  prove t/db_dependent/api/v1/two_factor_auth.t
must return green

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/api/v1/two_factor_auth.t