Skip to content

Commit

Permalink
Merge pull request #99 from tukcomCD2024/refactor/#98-backend-member-…
Browse files Browse the repository at this point in the history
…nickname

Refactor/#98 backend member nickname
  • Loading branch information
yeonjy authored Apr 30, 2024
2 parents 5a81b46 + df4ee06 commit 48c2e00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
public class MemberUpdateDto {
@Schema(description = "변경할 닉네임")
private String nickname;
@Schema(description = "변경할 이미지 S3 Url")
private String imageUrl;

public MemberServiceDto toServiceDto(String email) {
return MemberServiceDto.builder()
.email(email)
.nickname(this.nickname)
.imageUrl(this.imageUrl)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class AuthTest extends LoginTest {
public void accessToken_로그인_성공() throws Exception {
// when
final ResultActions perform = mockMvc.perform(post("/members").contentType(MediaType.APPLICATION_JSON)
.content(toRequestBody(new MemberUpdateDto("yeonjy", "imageUrl2")))
.content(toRequestBody(new MemberUpdateDto("yeonjy")))
.header("Authorization", "Bearer " + accessToken));

// then
Expand All @@ -55,7 +55,7 @@ public class AuthTest extends LoginTest {

// when
final ResultActions perform = mockMvc.perform(post("/members").contentType(MediaType.APPLICATION_JSON)
.content(toRequestBody(new MemberUpdateDto("yeonjy", "imageUrl2")))
.content(toRequestBody(new MemberUpdateDto("yeonjy")))
.header("Authorization", "Bearer " + accessToken));

// then
Expand All @@ -78,7 +78,7 @@ public class AuthTest extends LoginTest {

// when
final ResultActions perform = mockMvc.perform(post("/members").contentType(MediaType.APPLICATION_JSON)
.content(toRequestBody(new MemberUpdateDto("yeonjy", "imageUrl2")))
.content(toRequestBody(new MemberUpdateDto("yeonjy")))
.header("Authorization-refresh", "Bearer " + refreshToken)).andDo(print());

// then
Expand All @@ -99,7 +99,7 @@ public class AuthTest extends LoginTest {

// when
final ResultActions perform = mockMvc.perform(post("/members").contentType(MediaType.APPLICATION_JSON)
.content(toRequestBody(new MemberUpdateDto("yeonjy", "imageUrl2")))
.content(toRequestBody(new MemberUpdateDto("yeonjy")))
.header("Authorization-refresh", "Bearer " + refreshToken)).andDo(print());

// then
Expand Down

0 comments on commit 48c2e00

Please sign in to comment.