I created simple Spring Boot application with RestController and provided two test classes. One using MockMvc and one using RestAssured. All is available in referenced git repository, commit: 5e582670001373804778abd41039cf23ba476bb9.
Each class have 2 tests. One for http 200 status code and one for 415. The problem is that I'm not able to check returned content type and body in case http 415 code as MockMvc claims that there is no content type set and body doesn't contain expected "status" field.
Could you create a StackOverflow question for that (feel free to ping us here with the link)? The Spring team and the whole community are monitoring tags on SO for questions and help.
We're using this tracker for Spring Framework issues only.
marek.zurawski opened SPR-17436 and commented
I created simple Spring Boot application with RestController and provided two test classes. One using MockMvc and one using RestAssured. All is available in referenced git repository, commit: 5e582670001373804778abd41039cf23ba476bb9.
Each class have 2 tests. One for http 200 status code and one for 415. The problem is that I'm not able to check returned content type and body in case http 415 code as MockMvc claims that there is no content type set and body doesn't contain expected "status" field.
Affects: 5.0.9
Reference URL: https://github.com/hawk1234/characterEncodingTest
Attachments:
The text was updated successfully, but these errors were encountered: