|
18 | 18 | import org.tuna.zoopzoop.backend.testSupport.ControllerTestSupport; |
19 | 19 |
|
20 | 20 | import static org.hamcrest.Matchers.nullValue; |
| 21 | +import static org.hamcrest.Matchers.startsWith; |
21 | 22 | import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; |
22 | 23 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; |
23 | 24 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; |
@@ -439,9 +440,9 @@ void getMySpaces_withMembers_Success() throws Exception { |
439 | 440 | .andExpect(jsonPath("$.data.spaces[0].authority").value("ADMIN")) |
440 | 441 | .andExpect(jsonPath("$.data.spaces[0].members").isArray()) |
441 | 442 | .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"))) |
443 | 444 | .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"))) |
445 | 446 | .andExpect(jsonPath("$.data.spaces[0].members[1].authority").value("READ_ONLY")); |
446 | 447 |
|
447 | 448 |
|
@@ -589,7 +590,7 @@ void getSpace_Fail_NotFound() throws Exception { |
589 | 590 | @DisplayName("스페이스 단건 조회 - 실패 : 스페이스 멤버가 아닌 사용자") |
590 | 591 | void getSpace_Fail_NotMember() throws Exception { |
591 | 592 | // Given |
592 | | - Space space = spaceService.findByName("기존 스페이스 1_forSpaceControllerTest"); |
| 593 | + Space space = spaceService.findByName("기존 스페이스 2_forSpaceControllerTest"); |
593 | 594 | Integer spaceId = space.getId(); |
594 | 595 | String url = String.format("/api/v1/space/%d", spaceId); |
595 | 596 |
|
|
0 commit comments