Skip to content

Commit

Permalink
Test HasBody
Browse files Browse the repository at this point in the history
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
  • Loading branch information
kzys committed Oct 25, 2021
1 parent 7729882 commit 69c0f14
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions request_test.go
Expand Up @@ -153,6 +153,14 @@ func TestJSONRequest(t *testing.T) {
assert.Nil(t, req)
}

func TestHasBody(t *testing.T) {
req, _ := http.NewRequest("GET", "", nil)
assert.False(t, HasBody(req))

req.ContentLength = 123
assert.True(t, HasBody(req))
}

func TestMethod(t *testing.T) {
testcase := []struct {
method string
Expand Down

0 comments on commit 69c0f14

Please sign in to comment.