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