Skip to content

Commit

Permalink
Fix failing unit test
Browse files Browse the repository at this point in the history
Caused by bug in Spring MockMvc multipart file upload:
spring-projects/spring-framework#26261
  • Loading branch information
Timo van de Put committed Dec 17, 2020
1 parent 7f7e3d7 commit 44c656f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ void updatesProject() throws Exception {

@Test
void uploadsSpdxFile() throws Exception {
final var file = new MockMultipartFile("file", "Data".getBytes());
// Filename necessary due to Spring bug: https://github.com/spring-projects/spring-framework/issues/26261
final var file = new MockMultipartFile("file", "Filename", MediaType.TEXT_PLAIN_VALUE, "Data".getBytes());

mvc.perform(multipart(UPLOAD_SPDX_URL, PROJECT_ID).file(file))
.andExpect(status().isOk());
Expand Down

0 comments on commit 44c656f

Please sign in to comment.