Files
Backend/src/test/java/xyz/mcutils/backend/tests/MojangControllerTests.java
Liam 1eb540380e
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Failing after 50s
pls work
2024-04-18 13:58:28 +01:00

33 lines
1.2 KiB
Java

package xyz.mcutils.backend.tests;
import cc.fascinated.config.TestRedisConfig;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
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.context.junit.jupiter.SpringExtension;
import org.springframework.test.web.servlet.MockMvc;
import xyz.mcutils.backend.config.TestMongoConfig;
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, TestMongoConfig.class})
@ExtendWith(SpringExtension.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());
}
}