Skip to content

Commit 0ac9419

Browse files
committed
refactor: Update AccommodationControllerTest
Add check list size
1 parent 9ca7ae4 commit 0ac9419

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/com/mip/sharebnb/controller/AccommodationControllerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ void getAccommodation() throws Exception {
4545
@Test
4646
void getAllAccommodations() throws Exception {
4747
mockMvc.perform(MockMvcRequestBuilders.get("/api/accommodations"))
48-
.andExpect(status().isOk());
48+
.andExpect(status().isOk())
49+
.andExpect(jsonPath("$.content", hasSize(1)));
4950
}
5051

5152
@DisplayName("도시 명으로 숙박 검색")

0 commit comments

Comments
 (0)