MCPcopy
hub / github.com/dghubble/gologin / AssertSuccessNotCalled

Function AssertSuccessNotCalled

testutils/asserts.go:13–18  ·  view source on GitHub ↗

AssertSuccessNotCalled is a success http.Handler that fails if called.

(t *testing.T)

Source from the content-addressed store, hash-verified

11
12// AssertSuccessNotCalled is a success http.Handler that fails if called.
13func AssertSuccessNotCalled(t *testing.T) http.Handler {
14 fn := func(w http.ResponseWriter, req *http.Request) {
15 assert.Fail(t, "unexpected call to success Handler")
16 }
17 return http.HandlerFunc(fn)
18}
19
20// AssertFailureNotCalled is a failure http.Handler that fails if called.
21func AssertFailureNotCalled(t *testing.T) http.Handler {

Calls

no outgoing calls