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

Function AssertFailureNotCalled

testutils/asserts.go:21–26  ·  view source on GitHub ↗

AssertFailureNotCalled is a failure http.Handler that fails if called.

(t *testing.T)

Source from the content-addressed store, hash-verified

19
20// AssertFailureNotCalled is a failure http.Handler that fails if called.
21func AssertFailureNotCalled(t *testing.T) http.Handler {
22 fn := func(w http.ResponseWriter, req *http.Request) {
23 assert.Fail(t, "unexpected call to failure Handler")
24 }
25 return http.HandlerFunc(fn)
26}
27
28// AssertBodyString asserts that a Request Body matches the expected string.
29func AssertBodyString(t *testing.T, rc io.ReadCloser, expected string) {

Callers 11

TestLoginHandlerFunction · 0.92
TestCallbackHandlerFunction · 0.92
TestTokenHandlerFunction · 0.92
TestGoogleHandlerFunction · 0.92
TestFacebookHandlerFunction · 0.92
TestGithubHandlerFunction · 0.92
TestBitbucketHandlerFunction · 0.92
TestLoginHandlerFunction · 0.92
TestAuthRedirectHandlerFunction · 0.92
TestCallbackHandlerFunction · 0.92

Calls

no outgoing calls

Tested by 11

TestLoginHandlerFunction · 0.74
TestCallbackHandlerFunction · 0.74
TestTokenHandlerFunction · 0.74
TestGoogleHandlerFunction · 0.74
TestFacebookHandlerFunction · 0.74
TestGithubHandlerFunction · 0.74
TestBitbucketHandlerFunction · 0.74
TestLoginHandlerFunction · 0.74
TestAuthRedirectHandlerFunction · 0.74
TestCallbackHandlerFunction · 0.74