[#41] 예약 스키마 재정의 #42

Merged
pricelees merged 41 commits from refactor/#41 into main 2025-09-09 00:43:39 +00:00
3 changed files with 12 additions and 12 deletions
Showing only changes of commit fc3c6e42b0 - Show all commits

View File

@ -50,7 +50,7 @@ class ScheduleApiTest(
runTest( runTest(
token = token, token = token,
on = { on = {
get("/schedules/1") get("/schedules/$INVALID_PK")
}, },
expect = commonAssertion expect = commonAssertion
) )
@ -63,7 +63,7 @@ class ScheduleApiTest(
body(createRequest) body(createRequest)
}, },
on = { on = {
get("/schedules/1") get("/schedules/$INVALID_PK")
}, },
expect = commonAssertion expect = commonAssertion
) )
@ -263,7 +263,7 @@ class ScheduleApiTest(
runTest( runTest(
token = loginUtil.loginAsAdmin(), token = loginUtil.loginAsAdmin(),
on = { on = {
get("/schedules/1") get("/schedules/$INVALID_PK")
}, },
expect = { expect = {
statusCode(HttpStatus.NOT_FOUND.value()) statusCode(HttpStatus.NOT_FOUND.value())
@ -402,7 +402,7 @@ class ScheduleApiTest(
runTest( runTest(
token = loginUtil.loginAsUser(), token = loginUtil.loginAsUser(),
on = { on = {
patch("/schedules/1/hold") patch("/schedules/$INVALID_PK/hold")
}, },
expect = { expect = {
statusCode(HttpStatus.NOT_FOUND.value()) statusCode(HttpStatus.NOT_FOUND.value())
@ -515,7 +515,7 @@ class ScheduleApiTest(
body(updateRequest) body(updateRequest)
}, },
on = { on = {
patch("/schedules/1") patch("/schedules/$INVALID_PK")
}, },
expect = { expect = {
statusCode(HttpStatus.NOT_FOUND.value()) statusCode(HttpStatus.NOT_FOUND.value())

View File

@ -33,7 +33,6 @@ class ThemeApiTest(
private val themeRepository: ThemeRepository private val themeRepository: ThemeRepository
) : FunSpecSpringbootTest() { ) : FunSpecSpringbootTest() {
init { init {
context("관리자가 아니면 접근할 수 없다.") { context("관리자가 아니면 접근할 수 없다.") {
lateinit var token: String lateinit var token: String
@ -74,7 +73,7 @@ class ThemeApiTest(
runTest( runTest(
token = token, token = token,
on = { on = {
get("/admin/themes/1") get("/admin/themes/$INVALID_PK")
}, },
expect = commonAssertion expect = commonAssertion
) )
@ -87,7 +86,7 @@ class ThemeApiTest(
body(createRequest) body(createRequest)
}, },
on = { on = {
patch("/admin/themes/1") patch("/admin/themes/$INVALID_PK")
}, },
expect = commonAssertion expect = commonAssertion
) )
@ -97,7 +96,7 @@ class ThemeApiTest(
runTest( runTest(
token = token, token = token,
on = { on = {
delete("/admin/themes/1") delete("/admin/themes/$INVALID_PK")
}, },
expect = commonAssertion expect = commonAssertion
) )
@ -402,7 +401,7 @@ class ThemeApiTest(
runTest( runTest(
token = loginUtil.loginAsAdmin(), token = loginUtil.loginAsAdmin(),
on = { on = {
get("/admin/themes/1") get("/admin/themes/$INVALID_PK")
}, },
expect = { expect = {
statusCode(HttpStatus.NOT_FOUND.value()) statusCode(HttpStatus.NOT_FOUND.value())
@ -433,7 +432,7 @@ class ThemeApiTest(
runTest( runTest(
token = loginUtil.loginAsAdmin(), token = loginUtil.loginAsAdmin(),
on = { on = {
delete("/admin/themes/1") delete("/admin/themes/$INVALID_PK")
}, },
expect = { expect = {
statusCode(HttpStatus.NOT_FOUND.value()) statusCode(HttpStatus.NOT_FOUND.value())
@ -507,7 +506,7 @@ class ThemeApiTest(
body(updateRequest) body(updateRequest)
}, },
on = { on = {
patch("/admin/themes/1") patch("/admin/themes/$INVALID_PK")
}, },
expect = { expect = {
statusCode(HttpStatus.NOT_FOUND.value()) statusCode(HttpStatus.NOT_FOUND.value())

View File

@ -9,6 +9,7 @@ import roomescape.theme.web.ThemeCreateRequest
import java.time.LocalDate import java.time.LocalDate
import java.time.LocalTime import java.time.LocalTime
const val INVALID_PK: Long = 9999L
val tsidFactory = TsidFactory(0) val tsidFactory = TsidFactory(0)
object MemberFixture { object MemberFixture {