HTTPBodyContainsf asserts that a specified handler returns a body that contains a string. require.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") Returns whether the assertion was successful (true) or not (false).
(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{})
| 690 | // |
| 691 | // Returns whether the assertion was successful (true) or not (false). |
| 692 | func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { |
| 693 | if h, ok := t.(tHelper); ok { |
| 694 | h.Helper() |
| 695 | } |
| 696 | if assert.HTTPBodyContainsf(t, handler, method, url, values, str, msg, args...) { |
| 697 | return |
| 698 | } |
| 699 | t.FailNow() |
| 700 | } |
| 701 | |
| 702 | // HTTPBodyNotContains asserts that a specified handler returns a |
| 703 | // body that does not contain a string. |
no test coverage detected
searching dependent graphs…