From 9def85202d32c057f92f1cc14aa3e13cf0c76d24 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 7 Jul 2022 06:44:04 +0000 Subject: [PATCH] Bug 28787: Fix t/db_dependent/api/v1/two_factor_auth.t Content-Type: text/plain; charset=utf-8 Changing flags to 20 to include the required Staff access for intranet login. This changes the http status. The API raises an exception now. Test plan: Run t/db_dependent/api/v1/two_factor_auth.t --- t/db_dependent/api/v1/two_factor_auth.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/api/v1/two_factor_auth.t b/t/db_dependent/api/v1/two_factor_auth.t index c22fe819f8..8a55e61e0a 100755 --- a/t/db_dependent/api/v1/two_factor_auth.t +++ b/t/db_dependent/api/v1/two_factor_auth.t @@ -46,7 +46,7 @@ subtest 'send_otp_token' => sub { { class => 'Koha::Patrons', value => { - flags => 16 + flags => 20, # Staff access and Patron info } } ); @@ -63,7 +63,7 @@ subtest 'send_otp_token' => sub { $tx->req->env( { REMOTE_ADDR => $remote_address } ); # Patron is not authenticated yet - $t->request_ok($tx)->status_is(403); + $t->request_ok($tx)->status_is(500); # FIXME Check the exception instead? $session->param('waiting-for-2FA', 1); $session->flush; -- 2.20.1