add blocked server test
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Failing after 15s

This commit is contained in:
Lee 2024-04-10 14:39:12 +01:00
parent 9d846dec1d
commit de338fed82
3 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,4 @@
package cc.fascinated;
package cc.fascinated.config;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;

View File

@ -1,4 +1,4 @@
package cc.fascinated;
package cc.fascinated.tests;
import cc.fascinated.model.player.Skin;
import org.junit.jupiter.api.Test;

View File

@ -1,6 +1,5 @@
package cc.fascinated;
package cc.fascinated.tests;
import cc.fascinated.model.player.Skin;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
@ -42,4 +41,13 @@ class ServerControllerTests {
.contentType(MediaType.IMAGE_PNG))
.andExpect(status().isOk());
}
@Test
public void ensureBlockedServerLookupSuccess() throws Exception {
mockMvc.perform(get("/server/blocked/play.hypixel.net")
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.blocked").value(false));
}
}