Message fixed

Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>
This commit is contained in:
Dominic Schabel
2018-12-17 11:04:52 +01:00
parent a6cfd4205a
commit c9067156d9

View File

@@ -206,7 +206,7 @@ public class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegra
.accept(MediaType.APPLICATION_JSON)).andDo(MockMvcResultPrinter.print())
.andExpect(status().isForbidden());
}
@Test
@Description("Verifies that artifact with invalid filename cannot be uploaded to prevent cross site scripting.")
public void uploadArtifactFailsIfFilenameInvalide() throws Exception {
@@ -219,7 +219,7 @@ public class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegra
mvc.perform(fileUpload("/rest/v1/softwaremodules/{smId}/artifacts", sm.getId()).file(file)
.accept(MediaType.APPLICATION_JSON)).andDo(MockMvcResultPrinter.print())
.andExpect(status().isBadRequest())
.andExpect(jsonPath("$.message", containsString("The filename might contain unsafe HTML code.")));
.andExpect(jsonPath("$.message", containsString("Invalid characters in string")));
}
private void assertArtifact(final SoftwareModule sm, final byte[] random) throws IOException {