Files
Backend/src/test/java/xyz/mcutils/backend/tests/MojangControllerTests.java

29 lines
1.0 KiB
Java
Raw Normal View History

2024-04-13 20:53:31 +01:00
package xyz.mcutils.backend.tests;
2024-04-13 16:09:01 +01:00
import cc.fascinated.config.TestRedisConfig;
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.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@AutoConfigureMockMvc
@SpringBootTest(classes = TestRedisConfig.class)
class MojangControllerTests {
@Autowired
private MockMvc mockMvc;
@Test
public void ensureEndpointStatusLookupSuccess() throws Exception {
mockMvc.perform(get("/mojang/status")
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
}
}