From 5957c5ca8a139b31d3793abd9247831ad021cfd6 Mon Sep 17 00:00:00 2001 From: seungsje Date: Sat, 23 Mar 2024 18:28:00 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20@Valid=20=EC=98=B5=EC=85=98=EC=97=90=20?= =?UTF-8?q?=EB=A7=9E=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/TemplateAdminControllerTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gg-pingpong-api/src/test/java/gg/party/api/admin/template/TemplateAdminControllerTest.java b/gg-pingpong-api/src/test/java/gg/party/api/admin/template/TemplateAdminControllerTest.java index 160db0c8d..fa126d58d 100644 --- a/gg-pingpong-api/src/test/java/gg/party/api/admin/template/TemplateAdminControllerTest.java +++ b/gg-pingpong-api/src/test/java/gg/party/api/admin/template/TemplateAdminControllerTest.java @@ -81,7 +81,7 @@ public void success() throws Exception { //given TemplateAdminCreateReqDto templateAdminCreateReqDto = new TemplateAdminCreateReqDto( testCategory.getId(), "gameName", 4, 2, - 180, 180, "genre", "difficulty", "summary"); + 180, 180, "genre", "hard", "summary"); String jsonRequest = objectMapper.writeValueAsString(templateAdminCreateReqDto); //when String contentAsString = mockMvc.perform(post(url) @@ -101,7 +101,7 @@ public void fail() throws Exception { //given TemplateAdminCreateReqDto templateAdminCreateReqDto = new TemplateAdminCreateReqDto( 10L, "gameName", 4, 2, - 180, 180, "genre", "difficulty", "summary"); + 180, 180, "genre", "hard", "summary"); String jsonRequest = objectMapper.writeValueAsString(templateAdminCreateReqDto); //when && then String contentAsString = mockMvc.perform(post(url) @@ -122,7 +122,7 @@ void beforeEach() { userAccessToken = tokenProvider.createToken(userTester.getId()); testCategory = testDataUtils.createNewCategory("category"); testTemplate = testDataUtils.createTemplate(testCategory, "gameName", 4, - 2, 180, 180, "genre", "difficulty", "summary"); + 2, 180, 180, "genre", "hard", "summary"); } /** @@ -138,7 +138,7 @@ public void success() throws Exception { Category newTestCategory = testDataUtils.createNewCategory("newCate"); TemplateAdminUpdateReqDto templateAdminUpdateReqDto = new TemplateAdminUpdateReqDto( newTestCategory.getId(), "newGameName", 8, 4, - 90, 90, "newGenre", "newDifficulty", "newSummary"); + 90, 90, "newGenre", "easy", "newSummary"); String jsonRequest = objectMapper.writeValueAsString(templateAdminUpdateReqDto); //when String contentAsString = mockMvc.perform(patch(url) @@ -155,7 +155,7 @@ public void success() throws Exception { assertThat(testTemplate.getMaxGameTime()).isEqualTo(90); assertThat(testTemplate.getMinGameTime()).isEqualTo(90); assertThat(testTemplate.getGenre()).isEqualTo("newGenre"); - assertThat(testTemplate.getDifficulty()).isEqualTo("newDifficulty"); + assertThat(testTemplate.getDifficulty()).isEqualTo("easy"); assertThat(testTemplate.getSummary()).isEqualTo("newSummary"); } @@ -167,7 +167,7 @@ public void noCategoryFail() throws Exception { //given TemplateAdminUpdateReqDto templateAdminUpdateReqDto = new TemplateAdminUpdateReqDto( 10L, "newGameName", 8, 4, - 90, 90, "newGenre", "newDifficulty", "newSummary"); + 90, 90, "newGenre", "easy", "newSummary"); String jsonRequest = objectMapper.writeValueAsString(templateAdminUpdateReqDto); //when && then String contentAsString = mockMvc.perform(patch(url) @@ -186,7 +186,7 @@ public void noTemplateFail() throws Exception { Category newTestCategory = testDataUtils.createNewCategory("newCate"); TemplateAdminUpdateReqDto templateAdminUpdateReqDto = new TemplateAdminUpdateReqDto( newTestCategory.getId(), "newGameName", 8, 4, - 90, 90, "newGenre", "newDifficulty", "newSummary"); + 90, 90, "newGenre", "easy", "newSummary"); String jsonRequest = objectMapper.writeValueAsString(templateAdminUpdateReqDto); //when && then String contentAsString = mockMvc.perform(patch(url) @@ -207,7 +207,7 @@ void beforeEach() { userAccessToken = tokenProvider.createToken(userTester.getId()); testCategory = testDataUtils.createNewCategory("category"); testTemplate = testDataUtils.createTemplate(testCategory, "gameName", 4, - 2, 180, 180, "genre", "difficulty", "summary"); + 2, 180, 180, "genre", "hard", "summary"); } /**