mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 11:36:53 +00:00
Measure captcha challenge success rates.
This commit is contained in:
1 parent
760462f8fb
commit
d45154f2aa
2 files changed
+15
No files matched your search
+2
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user