Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public record RecordDetailViewResponse(
String recordId,
@Schema(description = "기록 제목")
String title,
@Schema(description = "기록 설명")
String description,
@Schema(description = "기록 시작 시간")
LocalDateTime startedAt,
LocalDateTime endAt,
Expand All @@ -32,6 +34,8 @@ public static RecordDetailViewResponse from(final RunningRecord runningRecord) {
return RecordDetailViewResponse.builder()
.recordId(runningRecord.getRecordPublicId())
.title(runningRecord.getTitle())
.description(runningRecord.getDescription())
.imgUrl(runningRecord.getImgUrl())
.startedAt(runningRecord.getStartedAt())
.endAt(runningRecord.getEndAt())
.totalRunningTime(runningRecord.getRunningTime().getSeconds())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,20 @@ void tearDown() {
.patch("/api/v1/records/record-public-id-1")
.then()
.statusCode(HttpStatus.OK.value());

given()
.header("Authorization", token)
.contentType(ContentType.JSON)
.when()
.get("/api/v1/records/{recordId}", "record-public-id-1")
.then()
.log().all()
.statusCode(200)
.body("payload.record_id", notNullValue())
.body("payload.title", equalTo("예시 제목"))
.body("payload.description", equalTo("오늘은 올림픽 공원을 달렸어요."))
.body("payload.img_url", equalTo("https://example.com/image.jpg"));

}
}