-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
37 additions
and
31 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
3 changes: 2 additions & 1 deletion
3
src/main/java/com/example/busan/member/dto/MemberInfoResponse.java
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package com.example.busan.member.dto; | ||
|
||
import com.example.busan.member.domain.Region; | ||
import com.example.busan.member.domain.Role; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public record MemberInfoResponse(String name, String phone, String email, Role role, String company, | ||
LocalDateTime createdAt) { | ||
Region region, LocalDateTime createdAt) { | ||
} |
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 |
---|---|---|
|
@@ -149,12 +149,12 @@ paths: | |
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/members-140297472' | ||
$ref: '#/components/schemas/members1182193868' | ||
examples: | ||
현재 유저 정보 조회하기: | ||
value: "{\"name\":\"연어\",\"phone\":\"01012341234\",\"email\":\"\ | ||
[email protected]\",\"role\":\"USER\",\"company\":\"우형\",\"createdAt\"\ | ||
:\"2023-11-25T21:57:28.839265\"}" | ||
[email protected]\",\"role\":\"USER\",\"company\":\"우형\",\"region\"\ | ||
:\"BUSAN\",\"createdAt\":\"2023-11-27T15:23:52.095109\"}" | ||
post: | ||
tags: | ||
- members | ||
|
@@ -279,13 +279,13 @@ paths: | |
examples: | ||
자신의 회의실 예약 목록 최신 순으로 보기: | ||
value: "[{\"id\":1,\"status\":\"RESERVED\",\"cancelReason\":null,\"\ | ||
startTime\":\"2023-11-25T21:57:30.235679\",\"endTime\":\"2023-11-25T23:57:30.235684\"\ | ||
startTime\":\"2023-11-27T15:23:53.632779\",\"endTime\":\"2023-11-27T17:23:53.632784\"\ | ||
,\"name\":\"황재현\",\"phone\":\"01012341234\",\"reservedAt\":\"\ | ||
2023-11-25T21:57:30.235693\",\"roomId\":1,\"roomName\":\"대회의실\"\ | ||
2023-11-27T15:23:53.632794\",\"roomId\":1,\"roomName\":\"대회의실\"\ | ||
},{\"id\":2,\"status\":\"CANCELED\",\"cancelReason\":\"쓰기 싫어졌어\ | ||
요..\",\"startTime\":\"2023-11-25T21:57:30.235701\",\"endTime\"\ | ||
:\"2023-11-25T23:57:30.235703\",\"name\":\"황재현\",\"phone\":\"\ | ||
01012341234\",\"reservedAt\":\"2023-11-25T21:57:30.235705\",\"\ | ||
요..\",\"startTime\":\"2023-11-27T15:23:53.632803\",\"endTime\"\ | ||
:\"2023-11-27T17:23:53.632804\",\"name\":\"황재현\",\"phone\":\"\ | ||
01012341234\",\"reservedAt\":\"2023-11-27T15:23:53.632807\",\"\ | ||
roomId\":1,\"roomName\":\"대회의실\"}]" | ||
post: | ||
tags: | ||
|
@@ -422,27 +422,6 @@ components: | |
email: | ||
type: string | ||
description: 이메일 형식 | ||
members-140297472: | ||
type: object | ||
properties: | ||
createdAt: | ||
type: string | ||
description: 가입일 | ||
role: | ||
type: string | ||
description: 계정 권한 | ||
phone: | ||
type: string | ||
description: 휴대폰 | ||
name: | ||
type: string | ||
description: 이름 | ||
company: | ||
type: string | ||
description: 회사 | ||
email: | ||
type: string | ||
description: 이메일 | ||
members-email-1386460070: | ||
type: object | ||
properties: | ||
|
@@ -529,6 +508,30 @@ components: | |
email: | ||
type: string | ||
description: 이메일 | ||
members1182193868: | ||
type: object | ||
properties: | ||
createdAt: | ||
type: string | ||
description: 가입일 | ||
role: | ||
type: string | ||
description: 계정 권한 | ||
phone: | ||
type: string | ||
description: 휴대폰 | ||
name: | ||
type: string | ||
description: 이름 | ||
company: | ||
type: string | ||
description: 회사 | ||
region: | ||
type: string | ||
description: 지역 | ||
email: | ||
type: string | ||
description: 이메일 | ||
reservations-reservationId-361069914: | ||
type: object | ||
properties: | ||
|
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 |
---|---|---|
|
@@ -202,7 +202,7 @@ void getMemberInfo() throws Exception { | |
//given | ||
httpSession.setAttribute(AUTHORIZATION, new Authentication("[email protected]", Role.USER)); | ||
given(memberService.getMemberInfo(any())) | ||
.willReturn(new MemberInfoResponse("연어", "01012341234", "[email protected]", Role.USER, "우형", LocalDateTime.now())); | ||
.willReturn(new MemberInfoResponse("연어", "01012341234", "[email protected]", Role.USER, "우형", Region.BUSAN, LocalDateTime.now())); | ||
|
||
//when | ||
final MockHttpServletResponse response = mockMvc.perform( | ||
|
@@ -215,6 +215,7 @@ void getMemberInfo() throws Exception { | |
fieldWithPath("company").description("회사"), | ||
fieldWithPath("createdAt").description("가입일"), | ||
fieldWithPath("email").description("이메일"), | ||
fieldWithPath("region").description("지역"), | ||
fieldWithPath("role").description("계정 권한")))) | ||
.andReturn() | ||
.getResponse(); | ||
|