HTTPBodyContains asserts that a specified handler returns a body that contains a string. assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") Returns whether the assertion was successful (true) or not (false).
(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{})
| 661 | // |
| 662 | // Returns whether the assertion was successful (true) or not (false). |
| 663 | func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { |
| 664 | if h, ok := t.(tHelper); ok { |
| 665 | h.Helper() |
| 666 | } |
| 667 | if assert.HTTPBodyContains(t, handler, method, url, values, str, msgAndArgs...) { |
| 668 | return |
| 669 | } |
| 670 | t.FailNow() |
| 671 | } |
| 672 | |
| 673 | // HTTPBodyContainsf asserts that a specified handler returns a |
| 674 | // body that contains a string. |
no test coverage detected
searching dependent graphs…