Various minor changes
- AsynchronousLogin: call common permission methods through CommonService instead of PermissionsManager - CommandManager: remove superfluous replacement of %p (handled by lazy tag replacer) - Remove unused method in CommonService - Create DebugSectionConsistencyTest - SendMailSSL: Enable debug output if AuthMe log level is set to debug - Add Utils#logAndSendMessage and replace existing, separate implementations
This commit is contained in:
@@ -4,8 +4,10 @@ import ch.jalu.injector.testing.BeforeInjecting;
|
||||
import ch.jalu.injector.testing.DelayedInjectionRunner;
|
||||
import ch.jalu.injector.testing.InjectDelayed;
|
||||
import fr.xephi.authme.TestHelper;
|
||||
import fr.xephi.authme.output.LogLevel;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import fr.xephi.authme.settings.properties.EmailSettings;
|
||||
import fr.xephi.authme.settings.properties.PluginSettings;
|
||||
import org.apache.commons.mail.EmailException;
|
||||
import org.apache.commons.mail.HtmlEmail;
|
||||
import org.junit.BeforeClass;
|
||||
@@ -49,6 +51,7 @@ public class SendMailSSLTest {
|
||||
public void initFields() throws IOException {
|
||||
given(settings.getProperty(EmailSettings.MAIL_ACCOUNT)).willReturn("mail@example.org");
|
||||
given(settings.getProperty(EmailSettings.MAIL_PASSWORD)).willReturn("pass1234");
|
||||
given(settings.getProperty(PluginSettings.LOG_LEVEL)).willReturn(LogLevel.INFO);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -67,6 +70,7 @@ public class SendMailSSLTest {
|
||||
given(settings.getProperty(EmailSettings.MAIL_ACCOUNT)).willReturn(senderAccount);
|
||||
String senderName = "Server administration";
|
||||
given(settings.getProperty(EmailSettings.MAIL_SENDER_NAME)).willReturn(senderName);
|
||||
given(settings.getProperty(PluginSettings.LOG_LEVEL)).willReturn(LogLevel.DEBUG);
|
||||
|
||||
// when
|
||||
HtmlEmail email = sendMailSSL.initializeMail("recipient@example.com");
|
||||
|
||||
Reference in New Issue
Block a user