Skip to content

Commit

Permalink
test: 회원 탈퇴 통합 테스트 추가 #104
Browse files Browse the repository at this point in the history
  • Loading branch information
FaberJoo committed Nov 14, 2023
1 parent aa6201c commit 55ec660
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/test/java/io/oduck/api/e2e/member/MemberControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -710,4 +710,33 @@ void getReviewCountSuccess() throws Exception {
);
}
}

@DisplayName("회원 탈퇴")
@Nested
class DeleteWithdrawal {
@DisplayName("회원 탈퇴 성공시 204 NoContent 응답")
@Test
@WithCustomMockMember(id = 4L, email = "reina", password = "Qwer!234", role = Role.MEMBER)
void deleteWithdrawalSuccess() throws Exception {
// given

// when
ResultActions actions = mockMvc.perform(
delete(BASE_URL)
.contentType(MediaType.APPLICATION_JSON)
.accept(MediaType.APPLICATION_JSON)
.header(HttpHeaders.COOKIE, "oDuckio.sid={SESSION_VALUE}")
);

// then
actions
.andExpect(status().isNoContent())
.andDo(
document("deleteWithdrawal/success",
preprocessRequest(prettyPrint()),
preprocessResponse(prettyPrint())
)
);
}
}
}

0 comments on commit 55ec660

Please sign in to comment.