generated from pricelees/issue-pr-template
test: Schedule 및 Reservation에서의 변경 사항 테스트 반영
This commit is contained in:
parent
c0df43f840
commit
2d08a20aff
@ -69,16 +69,6 @@ class ScheduleService(
|
||||
throw ScheduleException(ScheduleErrorCode.SCHEDULE_NOT_AVAILABLE)
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
fun findScheduleOverviewById(id: Long): ScheduleOverviewResponse {
|
||||
val overview: ScheduleOverview = scheduleRepository.findOverviewByIdOrNull(id) ?: run {
|
||||
log.warn { "[ScheduleService.findScheduleOverview] 일정 개요 조회 실패: id=$id" }
|
||||
throw ScheduleException(ScheduleErrorCode.SCHEDULE_NOT_FOUND)
|
||||
}
|
||||
|
||||
return overview.toOverviewResponse()
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// All-Admin (본사, 매장 모두 사용가능)
|
||||
// ========================================
|
||||
@ -181,6 +171,16 @@ class ScheduleService(
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
fun findScheduleOverviewById(id: Long): ScheduleOverviewResponse {
|
||||
val overview: ScheduleOverview = scheduleRepository.findOverviewByIdOrNull(id) ?: run {
|
||||
log.warn { "[ScheduleService.findScheduleOverview] 일정 개요 조회 실패: id=$id" }
|
||||
throw ScheduleException(ScheduleErrorCode.SCHEDULE_NOT_FOUND)
|
||||
}
|
||||
|
||||
return overview.toOverviewResponse()
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Common (공통 메서드)
|
||||
// ========================================
|
||||
|
||||
@ -338,13 +338,13 @@ class ReservationApiTest(
|
||||
runTest(
|
||||
token = userToken,
|
||||
on = {
|
||||
get("/reservations/summary")
|
||||
get("/reservations/overview")
|
||||
},
|
||||
expect = {
|
||||
statusCode(HttpStatus.OK.value())
|
||||
body("data.reservations.size()", equalTo(3))
|
||||
assertProperties(
|
||||
props = setOf("id", "themeName", "date", "startAt", "status"),
|
||||
props = setOf("id", "storeName", "themeName", "date", "startFrom", "endAt", "status"),
|
||||
propsNameIfList = "reservations"
|
||||
)
|
||||
}
|
||||
@ -596,7 +596,9 @@ class ReservationApiTest(
|
||||
},
|
||||
expect = {
|
||||
statusCode(HttpStatus.OK.value())
|
||||
assertProperties(props = setOf("id", "user", "applicationDateTime", "payment"))
|
||||
assertProperties(props = setOf("id", "reserver", "user", "applicationDateTime", "payment"))
|
||||
assertProperties(props = setOf("name", "contact", "participantCount", "requirement"), propsNameIfList = "reserver")
|
||||
assertProperties(props = setOf("id", "name", "phone"), propsNameIfList = "user")
|
||||
}
|
||||
).also {
|
||||
it.extract().path<Long>("data.id") shouldBe reservation.id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user