MCPcopy Index your code
hub / github.com/github/github-mcp-server / TestCallbackHandlerSuccess

Function TestCallbackHandlerSuccess

internal/oauth/callback_test.go:32–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestCallbackHandlerSuccess(t *testing.T) {
33 rec, res := serveCallback(t, "state123", "code=the-code&state=state123")
34
35 require.NoError(t, res.err)
36 assert.Equal(t, "the-code", res.code)
37 assert.Equal(t, http.StatusOK, rec.Code)
38 assert.Contains(t, rec.Body.String(), "Authorization Successful")
39}
40
41func TestCallbackHandlerStateMismatch(t *testing.T) {
42 rec, res := serveCallback(t, "expected", "code=the-code&state=attacker")

Callers

nothing calls this directly

Calls 2

serveCallbackFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected