use of com.epam.ta.reportportal.ws.model.project.config.pattern.UpdatePatternTemplateRQ in project service-api by reportportal.
the class ProjectSettingsControllerTest method updatePatternTemplateWithDuplicateName.
@Test
void updatePatternTemplateWithDuplicateName() throws Exception {
UpdatePatternTemplateRQ updatePatternTemplateRQ = new UpdatePatternTemplateRQ();
updatePatternTemplateRQ.setName("some_name");
updatePatternTemplateRQ.setEnabled(true);
mockMvc.perform(put(DEFAULT_PROJECT_BASE_URL + "/settings/pattern/2").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(updatePatternTemplateRQ))).andExpect(status().isConflict());
}
use of com.epam.ta.reportportal.ws.model.project.config.pattern.UpdatePatternTemplateRQ in project service-api by reportportal.
the class ProjectSettingsControllerTest method updatePatternTemplateWithTheSameName.
@Test
void updatePatternTemplateWithTheSameName() throws Exception {
UpdatePatternTemplateRQ updatePatternTemplateRQ = new UpdatePatternTemplateRQ();
updatePatternTemplateRQ.setName("some_name");
updatePatternTemplateRQ.setEnabled(true);
mockMvc.perform(put(DEFAULT_PROJECT_BASE_URL + "/settings/pattern/1").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(updatePatternTemplateRQ))).andExpect(status().isOk());
}
use of com.epam.ta.reportportal.ws.model.project.config.pattern.UpdatePatternTemplateRQ in project service-api by reportportal.
the class ProjectSettingsControllerTest method updatePatternTemplate.
@Test
void updatePatternTemplate() throws Exception {
UpdatePatternTemplateRQ updatePatternTemplateRQ = new UpdatePatternTemplateRQ();
updatePatternTemplateRQ.setName("another_name");
updatePatternTemplateRQ.setEnabled(true);
mockMvc.perform(put(DEFAULT_PROJECT_BASE_URL + "/settings/pattern/1").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(updatePatternTemplateRQ))).andExpect(status().isOk());
}
Aggregations