MCPcopy Index your code
hub / github.com/belak/gitdir / TestCtxConfig

Function TestCtxConfig

context_test.go:83–97  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestCtxConfig(t *testing.T) {
84 t.Parallel()
85
86 ctx := context.Background()
87
88 // Check the default value
89 config := CtxConfig(ctx)
90 config.fs = nil
91 assert.Equal(t, NewConfig(nil), config)
92
93 // Check that when we set a value, this properly extracts it.
94 config = NewConfig(memfs.New())
95 ctx = context.WithValue(ctx, contextKeyConfig, config)
96 assert.Equal(t, config, CtxConfig(ctx))
97}
98
99func TestCtxSetUser(t *testing.T) {
100 t.Skip("not implemented")

Callers

nothing calls this directly

Calls 2

CtxConfigFunction · 0.85
NewConfigFunction · 0.85

Tested by

no test coverage detected