Skip to content

Commit

Permalink
refactor: 멤버 시나리오 테스트 score 변수 사용하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jxmen committed Aug 28, 2024
1 parent ec9eabc commit 23710e4
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ class MemberScenarioTest(
Pair(HttpMethod.GET, "/api/v5/subjects/${subject.id}/answer"),
)

apis.forEach { (method, api) ->
apis.forEach { (method, url) ->
when (method) {
HttpMethod.GET -> mockMvc.get(api).andExpect { status { isUnauthorized() } }
HttpMethod.POST -> mockMvc.post(api).andExpect { status { isUnauthorized() } }
HttpMethod.GET -> mockMvc.get(url).andExpect { status { isUnauthorized() } }
HttpMethod.POST -> mockMvc.post(url).andExpect { status { isUnauthorized() } }
else -> throw IllegalArgumentException("Unsupported method: $method")
}
}
}
Expand Down Expand Up @@ -161,7 +162,7 @@ class MemberScenarioTest(
answer(subject, answer)

validateChatSaved(subject, answer, nextQuestion, score)
validateMySubjectHasMaxScore(10)
validateMySubjectHasMaxScore(score)
}

it("멤버가 채팅을 초기화(아카이브)하면 채팅 내역이 지워지고, 아카이브에 저장된다") {
Expand Down

0 comments on commit 23710e4

Please sign in to comment.