From 7d61f2679cb8f69cc23b41b08fdad16c5325dfab Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Sat, 30 Sep 2017 20:51:49 +0200 Subject: [PATCH] Fix unit testing --- .../fr/xephi/authme/settings/properties/SecuritySettings.java | 2 +- src/test/java/fr/xephi/authme/data/TempbanManagerTest.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java b/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java index 04af8e4a..07d0eaf9 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java @@ -107,7 +107,7 @@ public final class SecuritySettings implements SettingsHolder { public static final Property 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 TEMPBAN_CUSTOM_COMMAND = newProperty("Security.tempban.customCommand", ""); diff --git a/src/test/java/fr/xephi/authme/data/TempbanManagerTest.java b/src/test/java/fr/xephi/authme/data/TempbanManagerTest.java index ab1cbb0b..1363e0b2 100644 --- a/src/test/java/fr/xephi/authme/data/TempbanManagerTest.java +++ b/src/test/java/fr/xephi/authme/data/TempbanManagerTest.java @@ -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; }