Skip to content

Commit

Permalink
refactor(member): add university authentication status data to respon…
Browse files Browse the repository at this point in the history
…se values in member details API
  • Loading branch information
Chaerim1001 committed Sep 24, 2023
1 parent 53f5ee7 commit 1a9b093
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public record MemberDetailResponseDto(
String college,
String collegeType,
String admissionYear,
ProfileImageResponseDto profileImage
ProfileImageResponseDto profileImage,
Boolean authUnivStatus
) {

public static MemberDetailResponseDto of(final Member member, final String college) {
Expand All @@ -27,6 +28,7 @@ public static MemberDetailResponseDto of(final Member member, final String colle
.collegeType(member.getCollegeInfo().getCollegeType().getDescription())
.admissionYear(member.getCollegeInfo().getAdmissionYear())
.profileImage(profileImage)
.authUnivStatus(member.getEmail() != null)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ private void getMemberDetailWriteRestDocs(ResultActions perform) throws Exceptio
fieldWithPath("data.profileImage.basicUrl").type(JsonFieldType.STRING)
.description("회원 개인 프로필 사진 원본"),
fieldWithPath("data.profileImage.lowUrl").type(JsonFieldType.STRING)
.description("회원 개인 프로필 사진 저해상도")
.description("회원 개인 프로필 사진 저해상도"),
fieldWithPath("data.authUnivStatus").type(JsonFieldType.BOOLEAN)
.description("대학 인증 여부")
)
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ void readMemberInfo_Success() {
MemberDetailResponseDto memberDetailResponseDto = memberService.readMemberDetail(
kai.getMemberId());
assertThat(memberDetailResponseDto).isNotNull()
.extracting("nickname", "college", "collegeType", "mbti", "admissionYear")
.contains(kai.getNickname(), "안양대", "인문사회", Mbti.INFJ, "17");
.extracting("nickname", "college", "collegeType", "mbti", "admissionYear",
"authUnivStatus")
.contains(kai.getNickname(), "안양대", "인문사회", Mbti.INFJ, "17", true);
}

@DisplayName("회원 ID가 잘못되었을 경우, 회원 정보를 조회할 수 없다.")
Expand Down

0 comments on commit 1a9b093

Please sign in to comment.