feat(stammbaum): family network — graph, badge, edit card, /stammbaum page (#358) #360
@@ -46,6 +46,18 @@ class RelationshipControllerTest {
|
|||||||
.andExpect(jsonPath("$.code").value(ErrorCode.RELATIONSHIP_NOT_FOUND.name()));
|
.andExpect(jsonPath("$.code").value(ErrorCode.RELATIONSHIP_NOT_FOUND.name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getRelationships_returns401_whenUnauthenticated() throws Exception {
|
||||||
|
mockMvc.perform(get("/api/persons/{id}/relationships", PERSON_ID))
|
||||||
|
.andExpect(status().isUnauthorized());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getNetwork_returns401_whenUnauthenticated() throws Exception {
|
||||||
|
mockMvc.perform(get("/api/network"))
|
||||||
|
.andExpect(status().isUnauthorized());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@WithMockUser(username = "testuser", authorities = {"READ_ALL"})
|
@WithMockUser(username = "testuser", authorities = {"READ_ALL"})
|
||||||
void addRelationship_returns403_for_user_with_READ_ALL_only() throws Exception {
|
void addRelationship_returns403_for_user_with_READ_ALL_only() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user