Skip to content

Commit

Permalink
hotfix: 서술형 제출 변수명 변경 (#165)
Browse files Browse the repository at this point in the history
* feat: 서술형 제출 변수명 변경

* fix config version

---------

Co-authored-by: kshired <[email protected]>
  • Loading branch information
ekzm8523 and kshired authored Dec 17, 2023
1 parent 2837908 commit e1ac17e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ data class SubmitLongProblemResponseDto(
val title: String,
val tags: List<String>,
val description: String,
val totalSubmissionCount: Int,
val userSubmissionCount: Int,
val totalSubmission: Int,
val userSubmission: Int,
val userAnswer: String,
val standardAnswer: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ class LongProblemServiceImpl(
title = problem.title,
tags = tags,
description = problem.description,
totalSubmissionCount = totalSubmissionCount,
userSubmissionCount = userSubmissionCount,
totalSubmission = totalSubmissionCount,
userSubmission = userSubmissionCount,
userAnswer = answer,
standardAnswer = standardAnswer,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ class LongProblemControllerTest : RestDocsTest() {
title = "title",
tags = listOf("tag1", "tag2", "tag3"),
description = "description",
totalSubmissionCount = 100,
userSubmissionCount = 10,
totalSubmission = 100,
userSubmission = 10,
userAnswer = "user answer",
standardAnswer = "standard answer",
)
Expand Down Expand Up @@ -255,9 +255,9 @@ class LongProblemControllerTest : RestDocsTest() {
fieldWithPath("data.title").type(JsonFieldType.STRING).description("문제 제목"),
fieldWithPath("data.tags").type(JsonFieldType.ARRAY).description("태그"),
fieldWithPath("data.description").type(JsonFieldType.STRING).description("문제 설명"),
fieldWithPath("data.totalSubmissionCount").type(JsonFieldType.NUMBER)
fieldWithPath("data.totalSubmission").type(JsonFieldType.NUMBER)
.description("해당 문제에 대해 전체 유저가 제출한 수 (총 제출 수)"),
fieldWithPath("data.userSubmissionCount").type(JsonFieldType.NUMBER)
fieldWithPath("data.userSubmission").type(JsonFieldType.NUMBER)
.description("해당 문제에 대해 유저가 제출한 수 "),
fieldWithPath("data.userAnswer").type(JsonFieldType.STRING).description("유저의 답변"),
fieldWithPath("data.standardAnswer").type(JsonFieldType.STRING).description("모범 답안"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class LongProblemIntegrationTest : IntegrationTest() {
val responseDto = objectMapper.readValue<SubmitLongProblemResponseDto>(dataAsString)
responseDto.title shouldBe problem.title
responseDto.description shouldBe problem.description
responseDto.totalSubmissionCount shouldBe preSubmissionCount + 1 // 제출 수가 증가하는지 확인
responseDto.userSubmissionCount shouldBe preUserSubmissionCount + 1 // 제출 수가 증가하는지 확인
responseDto.totalSubmission shouldBe preSubmissionCount + 1 // 제출 수가 증가하는지 확인
responseDto.userSubmission shouldBe preUserSubmissionCount + 1 // 제출 수가 증가하는지 확인
responseDto.userAnswer shouldBe userAnswer
standardAnswers.map { sa -> sa.content } shouldContain responseDto.standardAnswer // 모법답안중 하나가 반환되는지 확인
}
Expand Down

0 comments on commit e1ac17e

Please sign in to comment.