Skip to content

Commit

Permalink
Issue IMCMS-562: User properties
Browse files Browse the repository at this point in the history
- Removed unnecessary tests
  • Loading branch information
Victor authored and Victor committed Jan 12, 2021
1 parent bf21d08 commit 991b21c
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,6 @@ public void getByIdAndKeyName_When_UserNotSuperAdmin_Expected_CorrectException()
performRequestBuilderExpectException(AccessDeniedException.class, requestBuilder);
}

@Test
public void getByIdAndValue_When_UserPropertyNotExist_Expected_OkAndEmptyResult() throws Exception {
assertTrue(userPropertyService.getAll().isEmpty());

final MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get(controllerPath() + "/value").param("id", userId+"").param("value", value);
performRequestBuilderExpectedOkAndJsonContentEquals(requestBuilder, "[]");
}

@Test
public void getByIdAndValue_When_UserNotSuperAdmin_Expected_CorrectException() throws Exception {
userPropertyDataInitializer.createData(userId, keyName, value);
assertFalse(userPropertyService.getAll().isEmpty());

setCommonUser();

final MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get(controllerPath() + "/value").param("id", userId+"").param("value", value);
performRequestBuilderExpectException(AccessDeniedException.class, requestBuilder);
}

@Test
public void createEntity_When_UserPropertyCorrect_Expected_OkAndCreatedCorrectData() throws Exception {
assertTrue(userPropertyService.getAll().isEmpty());
Expand Down

0 comments on commit 991b21c

Please sign in to comment.