feat(transcription): person @mention sidecar + rename propagation (PR-A backend, #362) #366
@@ -199,6 +199,20 @@ class TranscriptionBlockControllerTest {
|
|||||||
.andExpect(jsonPath("$.code").value("VALIDATION_ERROR"));
|
.andExpect(jsonPath("$.code").value("VALIDATION_ERROR"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@WithMockUser(authorities = "WRITE_ALL")
|
||||||
|
void createBlock_returns400_whenMentionedPersonPersonIdIsNull() throws Exception {
|
||||||
|
when(userService.findByEmail(any())).thenReturn(mockUser());
|
||||||
|
String body = "{\"pageNumber\":1,\"x\":0.1,\"y\":0.2,\"width\":0.3,\"height\":0.4,\"text\":\"x\","
|
||||||
|
+ "\"mentionedPersons\":[{\"personId\":null,\"displayName\":\"Auguste Raddatz\"}]}";
|
||||||
|
|
||||||
|
mockMvc.perform(post(URL_BASE)
|
||||||
|
.contentType(MediaType.APPLICATION_JSON)
|
||||||
|
.content(body))
|
||||||
|
.andExpect(status().isBadRequest())
|
||||||
|
.andExpect(jsonPath("$.code").value("VALIDATION_ERROR"));
|
||||||
|
}
|
||||||
|
|
||||||
// ─── PUT /api/documents/{id}/transcription-blocks/{blockId} ─────────────
|
// ─── PUT /api/documents/{id}/transcription-blocks/{blockId} ─────────────
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user