diff --git a/application/module-mail/src/test/java/org/fuseri/modulemail/service/MailControllerTest.java b/application/module-mail/src/test/java/org/fuseri/modulemail/service/MailControllerTest.java new file mode 100644 index 0000000000000000000000000000000000000000..af394ca532b5e060e7c6b1c3dccd4691d943199f --- /dev/null +++ b/application/module-mail/src/test/java/org/fuseri/modulemail/service/MailControllerTest.java @@ -0,0 +1,32 @@ +package org.fuseri.modulemail.service; + +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.web.servlet.MockMvc; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@SpringBootTest +@AutoConfigureMockMvc +class MailControllerTest { + + @Autowired + private MockMvc mockMvc; + + @Test + void getEmail() throws Exception { + mockMvc.perform(get("/mail/{id}", 1)) + .andExpect(status().isOk()); + } + + @Test + void deleteMail() throws Exception { + mockMvc.perform(delete("/mail/delete/{id}", 1)) + .andExpect(status().isOk()); + } + +} \ No newline at end of file