Skip to content

Commit

Permalink
refactor: 탈퇴 시 요청 메서드 변경 (#409)
Browse files Browse the repository at this point in the history
* refactor: 요청 메서드 타입 변경

* test: 테스트 실패 해결
  • Loading branch information
JJ503 authored and swonny committed Oct 6, 2023
1 parent f11b0fd commit 990d15c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
Expand Down Expand Up @@ -68,7 +67,7 @@ public ResponseEntity<Void> logout(
.build();
}

@DeleteMapping("/withdrawal/{oauth2Type}")
@PostMapping("/withdrawal/{oauth2Type}")
public ResponseEntity<Void> withdrawal(
@PathVariable final Oauth2Type oauth2Type,
@RequestHeader(HttpHeaders.AUTHORIZATION) final String accessToken,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ void setUp(@Autowired RestDocumentationContextProvider provider) {
)
)
);
;
}

@Test
Expand Down Expand Up @@ -304,7 +303,7 @@ void setUp(@Autowired RestDocumentationContextProvider provider) {
willDoNothing().given(authenticationService).withdrawal(any(), anyString(), anyString());

// when & then
mockMvc.perform(RestDocumentationRequestBuilders.delete("/oauth2/withdrawal/{oauth2Type}", "kakao")
mockMvc.perform(RestDocumentationRequestBuilders.post("/oauth2/withdrawal/{oauth2Type}", "kakao")
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(request))
.header(HttpHeaders.AUTHORIZATION, "Bearer accessToken")
Expand Down Expand Up @@ -336,7 +335,7 @@ void setUp(@Autowired RestDocumentationContextProvider provider) {
.withdrawal(any(), anyString(), anyString());

// when & then
mockMvc.perform(RestDocumentationRequestBuilders.delete("/oauth2/withdrawal/{oauth2Type}", "kakao")
mockMvc.perform(RestDocumentationRequestBuilders.post("/oauth2/withdrawal/{oauth2Type}", "kakao")
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(request))
.header(HttpHeaders.AUTHORIZATION, "Bearer accessToken")
Expand Down

0 comments on commit 990d15c

Please sign in to comment.