Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Add test for executing POST with absent body with OkHttp
Browse files Browse the repository at this point in the history
  • Loading branch information
WonderCsabo committed Dec 2, 2015
1 parent 0dc60e7 commit 0274092
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,13 @@ public void testGetAcceptEncodingNone() throws Exception {
}
}

@MediumTest
public void testPostWithAbsentBody() throws Exception {
ClientHttpRequest request = factory.createRequest(new URI(baseUrl + "/echo"), HttpMethod.POST);

ClientHttpResponse response = request.execute();

assertEquals("Invalid status code", HttpStatus.OK, response.getStatusCode());
}

}

0 comments on commit 0274092

Please sign in to comment.