(t *testing.T)
| 182 | } |
| 183 | |
| 184 | func TestHttpBody(t *testing.T) { |
| 185 | assert := New(t) |
| 186 | mockT := new(mockTestingT) |
| 187 | |
| 188 | assert.True(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!")) |
| 189 | assert.True(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World")) |
| 190 | assert.False(HTTPBodyContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world")) |
| 191 | |
| 192 | assert.False(HTTPBodyNotContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "Hello, World!")) |
| 193 | assert.False(HTTPBodyNotContains( |
| 194 | mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "World", |
| 195 | "Expected the request body to not contain 'World'. But it did.", |
| 196 | )) |
| 197 | assert.True(HTTPBodyNotContains(mockT, httpHelloName, "GET", "/", url.Values{"name": []string{"World"}}, "world")) |
| 198 | assert.Contains(mockT.errorString(), "Expected the request body to not contain 'World'. But it did.") |
| 199 | |
| 200 | assert.True(HTTPBodyContains(mockT, httpReadBody, "GET", "/", nil, "hello")) |
| 201 | } |
| 202 | |
| 203 | func TestHttpBodyWrappers(t *testing.T) { |
| 204 | assert := New(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…