Skip to content

Commit

Permalink
Fixes #2789 (#2880)
Browse files Browse the repository at this point in the history
* Fixes #2789

* Added space to test build fix

* Another test

* Another test
  • Loading branch information
aklish authored Feb 11, 2023
1 parent f21f359 commit 752c411
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @param <T> The deserialized type
*/
public interface Serde<S, T> {

/**
* Deserialize an instance of type S to type T.
* @param val The thing to deserialize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public ResponseEntity<String> call() throws Exception {
};
}

@DeleteMapping(value = "/**")
@DeleteMapping(value = "/**", produces = JSON_API_CONTENT_TYPE)
public Callable<ResponseEntity<String>> elideDelete(@RequestHeader HttpHeaders requestHeaders,
@RequestParam MultiValueMap<String, String> allRequestParams,
HttpServletRequest request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,18 @@ public void jsonApiDeleteTest() {
.statusCode(HttpStatus.SC_NO_CONTENT);
}

/**
* Function to verify the content type of a HTTP Delete error request.
*/
@Test
public void jsonApiDeleteErrorTest() {
when()
.delete("/json/group/doestnotexist")
.then()
.contentType(JsonApiController.JSON_API_CONTENT_TYPE)
.statusCode(HttpStatus.SC_NOT_FOUND);
}

@Test
@Sql(statements = {
"INSERT INTO ArtifactProduct (name, commonName, description, group_name) VALUES\n"
Expand Down

0 comments on commit 752c411

Please sign in to comment.