diff --git a/src/test/java/com/backend/blooming/admin/controller/AdminPageControllerTest.java b/src/test/java/com/backend/blooming/admin/controller/AdminPageControllerTest.java index 3ec47da0..2dd2a443 100644 --- a/src/test/java/com/backend/blooming/admin/controller/AdminPageControllerTest.java +++ b/src/test/java/com/backend/blooming/admin/controller/AdminPageControllerTest.java @@ -137,64 +137,4 @@ class AdminPageControllerTest extends AdminPageControllerTestFixture { .content(objectMapper.writeValueAsString(골_생성_요청)) ).andExpect(status().isNoContent()); } - - @Test - void 골을_생성시_골_이름이_없다면_400_예외를_발생시킨다() throws Exception { - // when & then - mockMvc.perform(post("/admin/goal") - .contentType(MediaType.APPLICATION_JSON) - .content(objectMapper.writeValueAsString(이름이_없는_골_생성_요청)) - ).andExpectAll( - status().isBadRequest(), - jsonPath("$.message").exists() - ); - } - - @Test - void 골을_생성시_시작_날짜가_없다면_400_예외를_발생시킨다() throws Exception { - // when & then - mockMvc.perform(post("/admin/goal") - .contentType(MediaType.APPLICATION_JSON) - .content(objectMapper.writeValueAsString(시작_날짜가_없는_골_생성_요청)) - ).andExpectAll( - status().isBadRequest(), - jsonPath("$.message").exists() - ); - } - - @Test - void 골을_생성시_종료_날짜가_없다면_400_예외를_발생시킨다() throws Exception { - // when & then - mockMvc.perform(post("/admin/goal") - .contentType(MediaType.APPLICATION_JSON) - .content(objectMapper.writeValueAsString(종료_날짜가_없는_골_생성_요청)) - ).andExpectAll( - status().isBadRequest(), - jsonPath("$.message").exists() - ); - } - - @Test - void 골을_생성시_생성자가_없다면_400_예외를_발생시킨다() throws Exception { - // when & then - mockMvc.perform(post("/admin/goal") - .contentType(MediaType.APPLICATION_JSON) - .content(objectMapper.writeValueAsString(골_생성자_아이디가_없는_골_생성_요청)) - ).andExpectAll( - status().isBadRequest(), - jsonPath("$.message").exists() - ); - } - - @Test - void 골을_생성시_팀원이_없다면_400_예외를_발생시킨다() throws Exception { - // when & then - mockMvc.perform(post("/admin/goal") - .contentType(MediaType.APPLICATION_JSON) - .content(objectMapper.writeValueAsString(팀원_아이디가_없는_골_생성_요청)) - ).andExpectAll( - status().isBadRequest(), - jsonPath("$.message").exists() - ); - } } diff --git a/src/test/java/com/backend/blooming/admin/controller/AdminPageControllerTestFixture.java b/src/test/java/com/backend/blooming/admin/controller/AdminPageControllerTestFixture.java index 7f828895..816e0969 100644 --- a/src/test/java/com/backend/blooming/admin/controller/AdminPageControllerTestFixture.java +++ b/src/test/java/com/backend/blooming/admin/controller/AdminPageControllerTestFixture.java @@ -58,44 +58,4 @@ public class AdminPageControllerTestFixture { List.of(골_생성_요청.manager(), 골_생성_요청.team()) ); protected Long 골_아이디 = 1L; - protected CreateGoalRequest 이름이_없는_골_생성_요청 = new CreateGoalRequest( - null, - 골_생성_요청.memo(), - 골_생성_요청.startDate(), - 골_생성_요청.endDate(), - 골_생성_요청.manager(), - 골_생성_요청.team() - ); - protected CreateGoalRequest 시작_날짜가_없는_골_생성_요청 = new CreateGoalRequest( - 골_생성_요청.name(), - 골_생성_요청.memo(), - null, - 골_생성_요청.endDate(), - 골_생성_요청.manager(), - 골_생성_요청.team() - ); - protected CreateGoalRequest 종료_날짜가_없는_골_생성_요청 = new CreateGoalRequest( - 골_생성_요청.name(), - 골_생성_요청.memo(), - 골_생성_요청.startDate(), - null, - 골_생성_요청.manager(), - 골_생성_요청.team() - ); - protected CreateGoalRequest 골_생성자_아이디가_없는_골_생성_요청 = new CreateGoalRequest( - 골_생성_요청.name(), - 골_생성_요청.memo(), - 골_생성_요청.startDate(), - 골_생성_요청.endDate(), - null, - 골_생성_요청.team() - ); - protected CreateGoalRequest 팀원_아이디가_없는_골_생성_요청 = new CreateGoalRequest( - 골_생성_요청.name(), - 골_생성_요청.memo(), - 골_생성_요청.startDate(), - 골_생성_요청.endDate(), - 골_생성_요청.manager(), - null - ); }