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

Function TestContextRequestToken

oauth1/context_test.go:10–18  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestContextRequestToken(t *testing.T) {
11 expectedToken := "request_token"
12 expectedSecret := "request_secret"
13 ctx := WithRequestToken(context.Background(), expectedToken, expectedSecret)
14 token, secret, err := RequestTokenFromContext(ctx)
15 assert.Equal(t, expectedToken, token)
16 assert.Equal(t, expectedSecret, secret)
17 assert.Nil(t, err)
18}
19
20func TestRequestTokenFromContext_Error(t *testing.T) {
21 token, secret, err := RequestTokenFromContext(context.Background())

Callers

nothing calls this directly

Calls 2

WithRequestTokenFunction · 0.85
RequestTokenFromContextFunction · 0.85

Tested by

no test coverage detected