Measure captcha challenge success rates.

This commit is contained in:
Jon Chambers
2021-05-12 12:59:40 -04:00
committed by Chris Eager
parent 760462f8fb
commit d45154f2aa
2 changed files with 15 additions and 0 deletions

View File

@@ -87,6 +87,8 @@ class RateLimitChallengeManagerTest {
@ValueSource(booleans = {true, false})
void answerRecaptchaChallenge(final boolean successfulChallenge) throws RateLimitExceededException {
final Account account = mock(Account.class);
when(account.getNumber()).thenReturn("+18005551234");
when(recaptchaClient.verify(any(), any())).thenReturn(successfulChallenge);
when(rateLimiters.getRecaptchaChallengeAttemptLimiter()).thenReturn(mock(RateLimiter.class));