mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-16 07:15:16 +01:00
Fix failing tests
This commit is contained in:
parent
d2c2d0fb39
commit
d51781fe5c
@ -949,6 +949,7 @@ public class PlayerListenerTest {
|
||||
// given
|
||||
HumanEntity player = mock(Player.class);
|
||||
InventoryView transaction = mock(InventoryView.class);
|
||||
given(transaction.getTitle()).willReturn("Spawn");
|
||||
given(settings.getProperty(RestrictionSettings.UNRESTRICTED_INVENTORIES)).willReturn(Collections.emptySet());
|
||||
InventoryOpenEvent event = new InventoryOpenEvent(transaction);
|
||||
given(event.getPlayer()).willReturn(player);
|
||||
|
@ -60,8 +60,8 @@ public class TotpAuthenticatorTest {
|
||||
TotpGenerationResult key2 = totpAuthenticator.generateTotpKey(player);
|
||||
|
||||
// then
|
||||
assertThat(key1.getTotpKey(), stringWithLength(16));
|
||||
assertThat(key2.getTotpKey(), stringWithLength(16));
|
||||
assertThat(key1.getTotpKey(), stringWithLength(32));
|
||||
assertThat(key2.getTotpKey(), stringWithLength(32));
|
||||
assertThat(key1.getAuthenticatorQrCodeUrl(), startsWith("https://api.qrserver.com/v1/create-qr-code/?data="));
|
||||
assertThat(key1.getAuthenticatorQrCodeUrl(), containsString("MCtopia"));
|
||||
assertThat(key2.getAuthenticatorQrCodeUrl(), startsWith("https://api.qrserver.com/v1/create-qr-code/?data="));
|
||||
|
Loading…
Reference in New Issue
Block a user