diff --git a/src/test/java/com/loafle/overflow/module/apikey/service/ApiKeyServiceTest.java b/src/test/java/com/loafle/overflow/module/apikey/service/ApiKeyServiceTest.java index fc01b92..be07583 100644 --- a/src/test/java/com/loafle/overflow/module/apikey/service/ApiKeyServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/apikey/service/ApiKeyServiceTest.java @@ -4,6 +4,7 @@ import com.loafle.overflow.module.apikey.model.ApiKey; import com.loafle.overflow.module.domain.model.Domain; import com.loafle.overflow.spring.AppConfig; import com.loafle.overflow.spring.JdbcConfiguration; +import com.loafle.overflow.spring.MailConfiguration; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -18,8 +19,7 @@ import static org.junit.Assert.*; * Created by snoop on 17. 6. 28. */ @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class}) - +@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class}) public class ApiKeyServiceTest { @Autowired @@ -57,4 +57,17 @@ public class ApiKeyServiceTest { Assert.assertNotEquals(result, false); } + @Ignore + @Test + public void findByDomain() { + + Domain domain = new Domain(); + domain.setId(1); + + ApiKey apiKey = this.apiKeyService.readByDomain(domain); + + Assert.assertNotEquals(apiKey, null); + + } + } \ No newline at end of file