Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MockMvc doesn't provide content type or body in case of an HTTP error [SPR-17436] #21969

spring-projects-issues opened this issue Oct 26, 2018 · 1 comment
in: test status: invalid


Copy link

@spring-projects-issues spring-projects-issues commented Oct 26, 2018

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:


Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 26, 2018

Brian Clozel commented

Hi marek.zurawski

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.


@spring-projects-issues spring-projects-issues added type: bug status: invalid in: test and removed type: bug labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: test status: invalid
None yet

No branches or pull requests

1 participant