aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-11-04 14:55:38 +0000
committerMatthew Somerville <matthew@mysociety.org>2019-11-05 17:54:14 +0000
commitf3836beb9226ef7c22cefbb01673d72ce532e87c (patch)
tree8b845ad8088ef1dc0350f2e3e2e91122232a493c /t/app/controller/auth.t
parent78f2bbaf9291572a86816e2ba05ec8972b0fd393 (diff)
Fix password reset on 2FA accounts again.
Just after fixing it, 3d593bc68 broke it again, because it took anyone who must have 2FA switched on to the must-have-2FA sign up flow, even if they already had 2FA set up.
Diffstat (limited to 't/app/controller/auth.t')
-rw-r--r--t/app/controller/auth.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t
index b23c1210c..7b74a025f 100644
--- a/t/app/controller/auth.t
+++ b/t/app/controller/auth.t
@@ -382,6 +382,11 @@ subtest "Test enforced two-factor authentication, no password yet set" => sub {
is $token, $user_token, '2FA secret set';
$mech->logged_in_ok;
+
+ $mech->get_ok($link);
+ $mech->content_contains('Please generate a two-factor code');
+ $mech->submit_form_ok({ with_fields => { '2fa_code' => $code } }, "provide correct 2FA code" );
+ $mech->content_lacks('requires two-factor');
};
};