| 1 | package com.aiinvestment.auth; |
| 2 | |
| 3 | import org.junit.jupiter.api.Test; |
| 4 | import java.util.Properties; |
| 5 | import static org.assertj.core.api.Assertions.assertThat; |
| 6 | |
| 7 | class ConfiguredAuthEmailSenderTest { |
| 8 | @Test void genericSmtpUsesAuthenticationAndRequiredStartTlsWithoutImplicitSsl() { |
| 9 | Properties properties = new Properties(); |
| 10 | ConfiguredAuthEmailSender.configureStartTls(properties); |
| 11 | assertThat(properties.getProperty("mail.smtp.auth")).isEqualTo("true"); |
| 12 | assertThat(properties.getProperty("mail.smtp.starttls.enable")).isEqualTo("true"); |
| 13 | assertThat(properties.getProperty("mail.smtp.starttls.required")).isEqualTo("true"); |
| 14 | assertThat(properties.getProperty("mail.smtp.ssl.enable")).isNotEqualTo("true"); |
| 15 | } |
| 16 | } |