use of com.epam.ta.reportportal.ws.model.DeleteBulkRQ in project service-api by reportportal.
the class UserControllerTest method deleteUsers.
@Test
void deleteUsers() throws Exception {
DeleteBulkRQ deleteBulkRQ = new DeleteBulkRQ();
deleteBulkRQ.setIds(Lists.newArrayList(2L));
mockMvc.perform(delete("/v1/user").with(token(oAuthHelper.getSuperadminToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(deleteBulkRQ))).andExpect(status().isOk());
}
use of com.epam.ta.reportportal.ws.model.DeleteBulkRQ in project service-api by reportportal.
the class LaunchControllerTest method bulkDeleteLaunches.
@Test
void bulkDeleteLaunches() throws Exception {
DeleteBulkRQ deleteBulkRQ = new DeleteBulkRQ();
List<Long> ids = Lists.newArrayList(1L, 2L);
deleteBulkRQ.setIds(ids);
mockMvc.perform(delete(DEFAULT_PROJECT_BASE_URL + "/launch").contentType(APPLICATION_JSON).with(token(oAuthHelper.getDefaultToken())).content(objectMapper.writeValueAsBytes(deleteBulkRQ))).andExpect(status().is(200));
List<Launch> launches = launchRepository.findAllById(ids);
assertTrue(launches.isEmpty());
}
use of com.epam.ta.reportportal.ws.model.DeleteBulkRQ in project service-api by reportportal.
the class ProjectControllerTest method bulkDeleteProjects.
@Test
void bulkDeleteProjects() throws Exception {
DeleteBulkRQ bulkRQ = new DeleteBulkRQ();
bulkRQ.setIds(Lists.newArrayList(2L, 3L));
mockMvc.perform(delete("/v1/project").with(token(oAuthHelper.getSuperadminToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(bulkRQ))).andExpect(status().isOk());
}
Aggregations