MCPcopy Index your code
hub / github.com/larksuite/cli / TestDisableAuthCheck

Function TestDisableAuthCheck

internal/cmdutil/annotations_test.go:12–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestDisableAuthCheck(t *testing.T) {
13 cmd := &cobra.Command{Use: "test"}
14 if IsAuthCheckDisabled(cmd) {
15 t.Error("expected auth check to be enabled by default")
16 }
17
18 DisableAuthCheck(cmd)
19 if !IsAuthCheckDisabled(cmd) {
20 t.Error("expected auth check to be disabled after DisableAuthCheck")
21 }
22}
23
24func TestIsAuthCheckDisabled_Inheritance(t *testing.T) {
25 parent := &cobra.Command{Use: "parent"}

Callers

nothing calls this directly

Calls 3

IsAuthCheckDisabledFunction · 0.85
DisableAuthCheckFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected