1
0

accessrights.jdl: UserRoleAssignments entity*Id required

Merge branch 'jhipster-generated'
This commit is contained in:
Michael Hoennig
2019-05-07 13:08:26 +02:00
22 changed files with 97 additions and 59 deletions

View File

@ -156,6 +156,44 @@ public class UserRoleAssignmentResourceIntTest {
assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeCreate);
}
@Test
@Transactional
public void checkEntityTypeIdIsRequired() throws Exception {
int databaseSizeBeforeTest = userRoleAssignmentRepository.findAll().size();
// set the field null
userRoleAssignment.setEntityTypeId(null);
// Create the UserRoleAssignment, which fails.
restUserRoleAssignmentMockMvc.perform(
post("/api/user-role-assignments")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(userRoleAssignment)))
.andExpect(status().isBadRequest());
List<UserRoleAssignment> userRoleAssignmentList = userRoleAssignmentRepository.findAll();
assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeTest);
}
@Test
@Transactional
public void checkEntityObjectIdIsRequired() throws Exception {
int databaseSizeBeforeTest = userRoleAssignmentRepository.findAll().size();
// set the field null
userRoleAssignment.setEntityObjectId(null);
// Create the UserRoleAssignment, which fails.
restUserRoleAssignmentMockMvc.perform(
post("/api/user-role-assignments")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(userRoleAssignment)))
.andExpect(status().isBadRequest());
List<UserRoleAssignment> userRoleAssignmentList = userRoleAssignmentRepository.findAll();
assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeTest);
}
@Test
@Transactional
public void checkAssignedRoleIsRequired() throws Exception {