Fix unit testing

This commit is contained in:
Gabriele C 2017-09-30 20:51:49 +02:00
parent 3ea250cb10
commit 7d61f2679c
2 changed files with 2 additions and 1 deletions

View File

@ -107,7 +107,7 @@ public final class SecuritySettings implements SettingsHolder {
public static final Property<Integer> TEMPBAN_MINUTES_BEFORE_RESET =
newProperty("Security.tempban.minutesBeforeCounterReset", 480);
@Comment({"If not empty this command will be executed instead of using the internal server ban system.",
@Comment({"The command to execute instead of using the internal ban system, empty if disabled.",
"Available placeholders: %player%, %ip%"})
public static final Property<String> TEMPBAN_CUSTOM_COMMAND =
newProperty("Security.tempban.customCommand", "");

View File

@ -221,6 +221,7 @@ public class TempbanManagerTest {
given(settings.getProperty(SecuritySettings.TEMPBAN_LENGTH)).willReturn(tempbanLength);
given(settings.getProperty(SecuritySettings.TEMPBAN_MINUTES_BEFORE_RESET))
.willReturn((int) TEST_EXPIRATION_THRESHOLD / 60_000);
given(settings.getProperty(SecuritySettings.TEMPBAN_CUSTOM_COMMAND)).willReturn("");
return settings;
}