#1141 Make 2fa messages translatable, various cleanups (null safety, ...)
This commit is contained in:
@@ -4,9 +4,9 @@ import com.warrenstrange.googleauth.IGoogleAuthenticator;
|
||||
import fr.xephi.authme.security.totp.TotpAuthenticator.TotpGenerationResult;
|
||||
import fr.xephi.authme.service.BukkitService;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
@@ -26,7 +26,6 @@ import static org.mockito.Mockito.verifyZeroInteractions;
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class TotpAuthenticatorTest {
|
||||
|
||||
@InjectMocks
|
||||
private TotpAuthenticator totpAuthenticator;
|
||||
|
||||
@Mock
|
||||
@@ -35,6 +34,11 @@ public class TotpAuthenticatorTest {
|
||||
@Mock
|
||||
private IGoogleAuthenticator googleAuthenticator;
|
||||
|
||||
@Before
|
||||
public void initializeTotpAuthenticator() {
|
||||
totpAuthenticator = new TotpAuthenticator(googleAuthenticator, bukkitService);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldGenerateTotpKey() {
|
||||
// given
|
||||
|
||||
@@ -65,9 +65,6 @@ commands:
|
||||
arg1:
|
||||
label: loginArg
|
||||
nonExistent: does not exist
|
||||
arg2:
|
||||
label: 2faArg
|
||||
rhetorical: false
|
||||
someProp:
|
||||
label: '''someProp'' does not exist'
|
||||
description: idk
|
||||
|
||||
Reference in New Issue
Block a user