use of com.epam.ta.reportportal.ws.model.project.UnassignUsersRQ in project service-api by reportportal.
the class ProjectControllerTest method unassignProjectUsersPositive.
@Test
void unassignProjectUsersPositive() throws Exception {
UnassignUsersRQ rq = new UnassignUsersRQ();
rq.setUsernames(singletonList("test_user"));
mockMvc.perform(put("/v1/project/test_project/unassign").with(token(oAuthHelper.getSuperadminToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(rq))).andExpect(status().isOk());
}
use of com.epam.ta.reportportal.ws.model.project.UnassignUsersRQ in project service-api by reportportal.
the class ProjectControllerTest method unassignUsersEmptyUserNames.
@Test
void unassignUsersEmptyUserNames() throws Exception {
UnassignUsersRQ rq = new UnassignUsersRQ();
rq.setUsernames(new ArrayList<>());
mockMvc.perform(put("/v1/project/test_project/unassign").with(token(oAuthHelper.getSuperadminToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(rq))).andExpect(status().isBadRequest());
}
Aggregations