errorHandler fails the test if invoked. Used to assert that a code path doesn't hit the handler at all.
(t *testing.T, msg string)
| 889 | // errorHandler fails the test if invoked. Used to assert that a |
| 890 | // code path doesn't hit the handler at all. |
| 891 | func errorHandler(t *testing.T, msg string) http.Handler { |
| 892 | t.Helper() |
| 893 | return http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) { |
| 894 | t.Errorf("unexpected handler call: %s", msg) |
| 895 | }) |
| 896 | } |
| 897 | |
| 898 | // requestCapture is a tiny helper that records the last request + |
| 899 | // counts how many times it was called. Compatible with http.Handler |
no outgoing calls
no test coverage detected