use of org.hisp.dhis.category.Category in project dhis2-core by dhis2.
the class SharingControllerTest method systemDefaultMetadata.
@Test
void systemDefaultMetadata() throws Exception {
final Category category = new Category();
category.setName(Category.DEFAULT_NAME);
doReturn(Category.class).when(aclService).classForType(eq("category"));
when(aclService.isClassShareable(eq(Category.class))).thenReturn(true);
when(manager.getNoAcl(eq(Category.class), eq("kkSjhdhks"))).thenReturn(category);
WebMessage message = sharingController.postSharing("category", "kkSjhdhks", request);
assertThat(message.getMessage(), containsString("Sharing settings of system default metadata object"));
}
Aggregations