HTTPBodyContains asserts that a specified handler returns a body that contains a string. a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") Returns whether the assertion was successful (true) or not (false).
(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{})
| 527 | // |
| 528 | // Returns whether the assertion was successful (true) or not (false). |
| 529 | func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { |
| 530 | if h, ok := a.t.(tHelper); ok { |
| 531 | h.Helper() |
| 532 | } |
| 533 | return HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) |
| 534 | } |
| 535 | |
| 536 | // HTTPBodyContainsf asserts that a specified handler returns a |
| 537 | // body that contains a string. |