Skip to content

Commit

Permalink
[test] : 채팅요청 응답 필드 수정 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun2371 committed Nov 16, 2024
1 parent 2344f70 commit 92f1835
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ void getChatInquiresByMember() throws Exception {
.andExpect(status().isOk())
.andExpect(jsonPath("$.size").value(2))
.andExpect(jsonPath("$.content[0].chatInquiryId").value(chatInquiry2.getId())) // 내림차순
.andExpect(jsonPath("$.content[0].partnerInfo.memberId").value(member2.getId()))
.andExpect(jsonPath("$.content[0].chatPartner.memberId").value(member2.getId()))
.andExpect(jsonPath("$.content[0].isInquirer").value(true))
.andExpect(jsonPath("$.content[0].inquiryStatus").value(InquiryStatus.PENDING.getLabel()))

.andExpect(jsonPath("$.content[1].chatInquiryId").value(chatInquiry1.getId()))
.andExpect(jsonPath("$.content[1].partnerInfo.memberId").value(member1.getId()))
.andExpect(jsonPath("$.content[1].chatPartner.memberId").value(member1.getId()))
.andExpect(jsonPath("$.content[1].isInquirer").value(false))
.andExpect(jsonPath("$.content[1].inquiryStatus").value(InquiryStatus.PENDING.getLabel()))
.andDo(MockMvcResultHandlers.print());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ void getChatInquiresByMember() {
Assertions.assertAll(
() -> assertThat(responses).hasSize(2),
() -> assertThat(responses.get(0).chatInquiryId()).isEqualTo(chatInquiries.get(1).getId()),
() -> assertThat(responses.get(0).partnerInfo().memberId()).isEqualTo(questioner.getId()),
() -> assertThat(responses.get(0).chatPartner().memberId()).isEqualTo(questioner.getId()),
() -> assertThat(responses.get(1).chatInquiryId()).isEqualTo(chatInquiries.get(0).getId()),
() -> assertThat(responses.get(1).partnerInfo().memberId()).isEqualTo(answerer.getId())
() -> assertThat(responses.get(1).chatPartner().memberId()).isEqualTo(answerer.getId())
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void createInquiry() {
assertAll(
() -> assertThat(response.chatInquiryId())
.isEqualTo(chatInquiryId),
() -> assertThat(response.partnerInfo().memberId())
() -> assertThat(response.chatPartner().memberId())
.isEqualTo(answerer.getId()),
() -> assertThat(response.inquiryMessage())
.isEqualTo(INQUIRY_MESSAGE)
Expand Down Expand Up @@ -153,7 +153,7 @@ void getChatInquiresByMember() {
() -> assertThat(response).hasSize(1),
() -> assertThat(response.get(0).chatInquiryId())
.isEqualTo(chatInquiryId),
() -> assertThat(response.get(0).partnerInfo().memberId())
() -> assertThat(response.get(0).chatPartner().memberId())
.isEqualTo(partner.getId()),
() -> assertThat(response.get(0).inquiryMessage())
.isEqualTo(INQUIRY_MESSAGE)
Expand Down

0 comments on commit 92f1835

Please sign in to comment.