Skip to content

Commit f70b9d5

Browse files
author
EpicFn
committed
fix : 테스트 케이스 수정
1 parent 76ebef0 commit f70b9d5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/java/org/tuna/zoopzoop/backend/domain/space/space/controller/ApiV1SpaceControllerTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import org.tuna.zoopzoop.backend.testSupport.ControllerTestSupport;
1919

2020
import static org.hamcrest.Matchers.nullValue;
21+
import static org.hamcrest.Matchers.startsWith;
2122
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
2223
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
2324
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@@ -439,9 +440,9 @@ void getMySpaces_withMembers_Success() throws Exception {
439440
.andExpect(jsonPath("$.data.spaces[0].authority").value("ADMIN"))
440441
.andExpect(jsonPath("$.data.spaces[0].members").isArray())
441442
.andExpect(jsonPath("$.data.spaces[0].members.length()").value(2)) // PENDING 제외 2명
442-
.andExpect(jsonPath("$.data.spaces[0].members[0].name").value("spaceControllerTester1"))
443+
.andExpect(jsonPath("$.data.spaces[0].members[0].name", startsWith("spaceControllerTester1")))
443444
.andExpect(jsonPath("$.data.spaces[0].members[0].authority").value("ADMIN"))
444-
.andExpect(jsonPath("$.data.spaces[0].members[1].name").value("spaceControllerTester3"))
445+
.andExpect(jsonPath("$.data.spaces[0].members[1].name", startsWith("spaceControllerTester3")))
445446
.andExpect(jsonPath("$.data.spaces[0].members[1].authority").value("READ_ONLY"));
446447

447448

@@ -589,7 +590,7 @@ void getSpace_Fail_NotFound() throws Exception {
589590
@DisplayName("스페이스 단건 조회 - 실패 : 스페이스 멤버가 아닌 사용자")
590591
void getSpace_Fail_NotMember() throws Exception {
591592
// Given
592-
Space space = spaceService.findByName("기존 스페이스 1_forSpaceControllerTest");
593+
Space space = spaceService.findByName("기존 스페이스 2_forSpaceControllerTest");
593594
Integer spaceId = space.getId();
594595
String url = String.format("/api/v1/space/%d", spaceId);
595596

0 commit comments

Comments
 (0)