I was expecting this 2 invocations to produce the same result, however I'm getting different results.
expectBody("", is(2)) // empty path
expectBody(is(2)) // no path
My context is too big to copy here, but I got this example from the documenation. I'm using expectBody
as shown here. However without a ""
path, my test is not passing.
I suppose there's a difference between these, but I can't find it in the documentation.
I'm using v.3.1
ResponseSpecBuilder builder = new ResponseSpecBuilder();
builder.expectStatusCode(200);
builder.expectBody("", is(2));
ResponseSpecification responseSpec = builder.build();
when().
get("/something").
then().
spec(responseSpec).