Add Maia chess gameplay and deployment
Some checks failed
Deploy Blog Backend / test (push) Successful in 2m6s
Deploy Blog Backend / deploy (push) Failing after 1m8s

This commit is contained in:
박원엽
2026-06-19 14:49:20 +09:00
parent b47258ea53
commit 3042dc898e
26 changed files with 1682 additions and 32 deletions

View File

@@ -0,0 +1,37 @@
package me.wypark.blogbackend.api.controller
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.context.ActiveProfiles
import org.springframework.test.web.servlet.MockMvc
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status
@SpringBootTest
@AutoConfigureMockMvc
@ActiveProfiles("test")
class ChessGameControllerSecurityIntegrationTest {
@Autowired
lateinit var mockMvc: MockMvc
@Test
fun `chess game creation requires login`() {
mockMvc.perform(
post("/api/chess/games")
.contentType(MediaType.APPLICATION_JSON)
.content("""{"rating":1500,"playerColor":"white","model":"5m"}""")
)
.andExpect(status().isUnauthorized)
}
@Test
fun `chess game history requires login`() {
mockMvc.perform(get("/api/chess/games"))
.andExpect(status().isUnauthorized)
}
}