Closed GoogleCodeExporter closed 9 years ago
In what way does it break? The header will not be taken into account in your
example since the specifications are immutable.
Original comment by johan.ha...@gmail.com
on 29 Aug 2014 at 9:11
I can't reproduce it. I've tried:
given().
spec(new MockMvcRequestSpecBuilder().setContentType(JSON).addHeader("accept", JSON.toString()).build()).
standaloneSetup(new GreetingController()).
formParam("name", "Johan").
when().
post("/greeting").
then().
statusCode(200).
body("id", equalTo(1)).
body("content", equalTo("Hello, Johan!"));
And GreetingController looks like this:
@RequestMapping(value = "/greeting", method = POST, consumes =
"application/json", produces = "application/json")
public @ResponseBody Greeting greetingWithRequiredContentType(
@RequestParam(value="name", required=false, defaultValue="World") String name) {
return new Greeting(counter.incrementAndGet(), String.format(template, name));
}
And this works fine for me..
Original comment by johan.ha...@gmail.com
on 29 Aug 2014 at 9:24
Closing due to inactivity
Original comment by johan.ha...@gmail.com
on 23 Sep 2014 at 9:08
I have updated to the latest release 2.3.4 and have noticed that the problem
has disappeared. Just wanted to post that in case anyone else is running into
the same problem. However I have really never been able to reproduce that issue
in an isolated test case.
Original comment by Martin.A...@gmail.com
on 22 Oct 2014 at 8:27
Thanks for the notification
Original comment by johan.ha...@gmail.com
on 22 Oct 2014 at 10:00
Original issue reported on code.google.com by
Martin.A...@gmail.com
on 25 Jun 2014 at 1:18