Revert "allow body for HTTPBodyContains and HTTPBodyNotContains for

POST" PR #938

This reverts commit 136026fb259a9c69ea2655a0f83500d50713ccf8.
This commit is contained in:
Boyan 2020-06-03 19:55:08 +10:00 committed by Boyan Soubachov
parent e7cc868148
commit 303198d014

View File

@ -167,7 +167,7 @@ func TestHttpBody(t *testing.T) {
body := strings.NewReader("I will get this request body back as response!!")
assert.True(HTTPBodyContains(mockT, httpPostHandler, "POST", "/", nil, body, "I will get this request body back as response!!"))
assert.True(HTTPBodyNotContains(mockT, httpPostHandler, "POST", "/", nil, body, "world"))
assert.True(HTTPBodyNotContains(mockT, httpPostHandler, "POST", "/", nil, nil, "world"))
}
func TestHttpBodyWrappers(t *testing.T) {
@ -184,7 +184,7 @@ func TestHttpBodyWrappers(t *testing.T) {
body := strings.NewReader("I will get this request body back as response!!")
assert.True(mockAssert.HTTPBodyContains(httpPostHandler, "POST", "/", nil, body, "I will get this request body back as response!!"))
assert.True(mockAssert.HTTPBodyNotContains(httpPostHandler, "POST", "/", nil, body, "world"))
assert.True(mockAssert.HTTPBodyNotContains(httpPostHandler, "POST", "/", nil, nil, "world"))
}
func httpGetHelloNameHandler(w http.ResponseWriter, r *http.Request) {