-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from kakao-tech-campus-2nd-step3/feature/36-me…
…mber-withdraw feat: 요구 사항 반영 및 회원 탈퇴 API 구현
- Loading branch information
Showing
16 changed files
with
82 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
@Getter | ||
public class MemberLoginRequest { | ||
|
||
private String email; | ||
private Long number; | ||
private String nickname; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,17 +47,15 @@ class MemberControllerTest { | |
void should_SearchMembers_When_ValidInput() throws Exception { | ||
// given | ||
String nickname = "testUser"; | ||
String email = "[email protected]"; | ||
Long key = 1L; | ||
int size = 10; | ||
MemberSearchResponse response = MemberSearchResponse.builder().build(); | ||
|
||
given(memberService.searchMembers(nickname, email, key, size)).willReturn(response); | ||
given(memberService.searchMembers(nickname, key, size)).willReturn(response); | ||
|
||
// when | ||
ResultActions result = mockMvc.perform(get("/api/members") | ||
.param("nickname", nickname) | ||
.param("email", email) | ||
.param("key", key.toString()) | ||
.param("size", String.valueOf(size))); | ||
|
||
|
@@ -67,15 +65,15 @@ void should_SearchMembers_When_ValidInput() throws Exception { | |
.andExpect(jsonPath("$.code").value(200)) | ||
.andExpect(jsonPath("$.message").value("success")); | ||
|
||
then(memberService).should().searchMembers(nickname, email, key, size); | ||
then(memberService).should().searchMembers(nickname, key, size); | ||
} | ||
|
||
@Test | ||
@DisplayName("내 정보 조회가 성공적으로 수행된다.") | ||
void should_ReturnMyInfo_When_ValidMember() throws Exception { | ||
// given | ||
Long memberId = 1L; | ||
MemberDetails memberDetails = createMemberDetails(memberId, "[email protected]", "test"); | ||
MemberDetails memberDetails = createMemberDetails(memberId, 1234L, "test"); | ||
|
||
MemberDetailResponse response = MemberDetailResponse.builder().build(); | ||
given(memberService.getMyInfo(memberId)).willReturn(response); | ||
|
@@ -120,7 +118,7 @@ void should_ReturnMemberInfo_When_ValidMemberId() throws Exception { | |
void should_UpdateMemberInfo_When_ValidInput() throws Exception { | ||
// given | ||
Long memberId = 1L; | ||
MemberDetails memberDetails = createMemberDetails(memberId, "[email protected]", "test"); | ||
MemberDetails memberDetails = createMemberDetails(memberId, 1234L, "test"); | ||
|
||
MockMultipartFile profileImage = new MockMultipartFile("profileImage", "image.png", "image/png", new byte[]{}); | ||
String nickname = "newNickname"; | ||
|
@@ -154,16 +152,16 @@ void should_ThrowException_When_ProfileImageAndNicknameAreMissing() throws Excep | |
then(memberService).shouldHaveNoInteractions(); | ||
} | ||
|
||
private Member createMember(Long memberId, String email, String nickname) { | ||
private Member createMember(Long memberId, Long number, String nickname) { | ||
return Member.builder() | ||
.id(memberId) | ||
.email(email) | ||
.number(number) | ||
.nickname(nickname) | ||
.build(); | ||
} | ||
|
||
private MemberDetails createMemberDetails(Long memberId, String email, String nickname) { | ||
Member member = createMember(memberId, email, nickname); | ||
private MemberDetails createMemberDetails(Long memberId, Long number, String nickname) { | ||
Member member = createMember(memberId, number, nickname); | ||
return new MemberDetails(member); | ||
} | ||
|
||
|
Oops, something went wrong.