diff --git a/src/main/java/com/devin/dev/controller/post/PostController.java b/src/main/java/com/devin/dev/controller/post/PostController.java index 7e1f4b6..e40658d 100644 --- a/src/main/java/com/devin/dev/controller/post/PostController.java +++ b/src/main/java/com/devin/dev/controller/post/PostController.java @@ -41,7 +41,7 @@ public DefaultResponse getPostListByCondition(PostSearchCondition condition, return postService.getPostInfoListByCondition(condition, pageable); } - @DeleteMapping("/postlist/{id}") + @DeleteMapping("/post/{id}") public DefaultResponse deletePost(@PathVariable("id") Long postId) { return postService.deletePost(postId); } diff --git a/src/test/java/com/devin/dev/mvc/PostControllerTest.java b/src/test/java/com/devin/dev/mvc/PostControllerTest.java index fc1b3f5..a5fd747 100644 --- a/src/test/java/com/devin/dev/mvc/PostControllerTest.java +++ b/src/test/java/com/devin/dev/mvc/PostControllerTest.java @@ -52,7 +52,7 @@ void requestPostFailed() throws Exception { @WithMockUser void requestDeleteSucceeded() throws Exception { List posts = postRepository.findByTitle("title_2"); - mvc.perform(delete("/postlist/" + posts.get(0).getId())) + mvc.perform(delete("/post/" + posts.get(0).getId())) .andDo(print()); } } \ No newline at end of file