-
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
2 changed files
with
5 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
import com.example.busan.ApiTest; | ||
import com.example.busan.auth.dto.AuthenticatePhoneRequest; | ||
import com.example.busan.auth.dto.Authentication; | ||
import com.example.busan.auth.dto.FindEmailRequest; | ||
import com.example.busan.auth.dto.FindEmailResponse; | ||
import com.example.busan.auth.dto.LoginRequest; | ||
import com.example.busan.auth.service.AuthService; | ||
|
@@ -134,16 +133,14 @@ void findEmailByPhone() throws Exception { | |
//given | ||
given(authService.findEmailByPhone(any())) | ||
.willReturn(new FindEmailResponse("[email protected]")); | ||
final String request = objectMapper.writeValueAsString(new FindEmailRequest("01012345678")); | ||
|
||
//when | ||
final MockHttpServletResponse response = mockMvc.perform( | ||
get("/auth/email") | ||
.content(request) | ||
.contentType(MediaType.APPLICATION_JSON)) | ||
.queryParam("phone", "01012341234")) | ||
.andDo(print()) | ||
.andDo(document("휴대폰 번호로 이메일 찾기", | ||
requestFields(fieldWithPath("phone").description("인증 완료된 휴대폰 번호")), | ||
queryParameters(parameterWithName("phone").description("인증 완료된 휴대폰 번호")), | ||
responseFields(fieldWithPath("email").description("해당 번호의 이메일")))) | ||
.andReturn() | ||
.getResponse(); | ||
|