(t *testing.T)
| 196 | } |
| 197 | |
| 198 | func TestHttpBody(t *testing.T) { |
| 199 | t.Parallel() |
| 200 | |
| 201 | assert := New(t) |
| 202 | mockT := new(mockTestingT) |
| 203 | |
| 204 | assert.True(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!")) |
| 205 | assert.True(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World")) |
| 206 | assert.False(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world")) |
| 207 | |
| 208 | assert.False(HTTPBodyNotContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!")) |
| 209 | assert.False(HTTPBodyNotContains( |
| 210 | mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World", |
| 211 | "Expected the request body to not contain 'World'. But it did.", |
| 212 | )) |
| 213 | assert.True(HTTPBodyNotContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world")) |
| 214 | assert.Contains(mockT.errorString(), "Expected the request body to not contain 'World'. But it did.") |
| 215 | |
| 216 | assert.True(HTTPBodyContains(mockT, httpReadBody, "GET", "/", nil, "hello")) |
| 217 | } |
| 218 | |
| 219 | func TestHttpBodyWrappers(t *testing.T) { |
| 220 | t.Parallel() |
nothing calls this directly
no test coverage detected