From ec7c9560bb7213ae2d4af57216d2f72e5a4e0699 Mon Sep 17 00:00:00 2001 From: choigiwoong Date: Mon, 2 Sep 2024 14:10:18 +0900 Subject: [PATCH] =?UTF-8?q?Refactor(#18):=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80,=20=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=EC=A6=88=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20(#98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../block/api/BlockControllerTest.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/test/java/shop/kkeujeok/kkeujeokbackend/block/api/BlockControllerTest.java b/src/test/java/shop/kkeujeok/kkeujeokbackend/block/api/BlockControllerTest.java index f15b02af..63b69927 100644 --- a/src/test/java/shop/kkeujeok/kkeujeokbackend/block/api/BlockControllerTest.java +++ b/src/test/java/shop/kkeujeok/kkeujeokbackend/block/api/BlockControllerTest.java @@ -315,9 +315,10 @@ void setUp(RestDocumentationContextProvider restDocumentation) { given(blockService.findForBlockByProgress(anyString(), anyLong(), anyString(), any())).willReturn(response); // when & then - mockMvc.perform(get(String.format("/api/blocks?dashboardId=%d&progress=%s", 1L, progressString)) - .header("Authorization", "Bearer valid-token") - .accept(MediaType.APPLICATION_JSON)) + mockMvc.perform( + get(String.format("/api/blocks?dashboardId=%d&progress=%s&page=%d&size=%d", 1L, progressString, 0, 10)) + .header("Authorization", "Bearer valid-token") + .accept(MediaType.APPLICATION_JSON)) .andDo(print()) .andDo(document("block/findByBlockWithProgress", preprocessRequest(prettyPrint()), @@ -326,7 +327,11 @@ void setUp(RestDocumentationContextProvider restDocumentation) { parameterWithName("dashboardId") .description("대시보드 아이디"), parameterWithName("progress") - .description("블록 상태 문자열(NOT_STARTED, IN_PROGRESS, COMPLETED)") + .description("블록 상태 문자열(NOT_STARTED, IN_PROGRESS, COMPLETED)"), + parameterWithName("page") + .description("페이지 번호"), + parameterWithName("size") + .description("페이지 크기") ), responseFields( fieldWithPath("statusCode").description("상태 코드"), @@ -411,5 +416,5 @@ void setUp(RestDocumentationContextProvider restDocumentation) { )) .andExpect(status().isOk()); } - + } \ No newline at end of file