Fix failing test

This commit is contained in:
ljacqu 2016-07-04 20:31:40 +02:00
parent 1c3ca520dc
commit 2867ebaddd
2 changed files with 5 additions and 2 deletions

View File

@ -27,7 +27,6 @@ import fr.xephi.authme.task.PlayerDataTaskManager;
import fr.xephi.authme.util.BukkitService;
import fr.xephi.authme.util.StringUtils;
import fr.xephi.authme.util.Utils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
@ -126,7 +125,7 @@ public class AsynchronousLogin implements AsynchronousProcess {
}
AuthMeAsyncPreLoginEvent event = new AuthMeAsyncPreLoginEvent(player);
Bukkit.getServer().getPluginManager().callEvent(event);
bukkitService.callEvent(event);
if (!event.canLogin()) {
return null;
}

View File

@ -2,6 +2,7 @@ package fr.xephi.authme.command.executable.authme;
import fr.xephi.authme.TestHelper;
import fr.xephi.authme.cache.auth.PlayerAuth;
import fr.xephi.authme.cache.limbo.LimboCache;
import fr.xephi.authme.command.CommandService;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.output.MessageKey;
@ -54,6 +55,9 @@ public class RegisterAdminCommandTest {
@Mock
private ValidationService validationService;
@Mock
private LimboCache limboCache;
@BeforeClass
public static void setUpLogger() {
TestHelper.setupLogger();