MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestJSONHelpAuthModeInferenceUsesTopLevelTeam

Function TestJSONHelpAuthModeInferenceUsesTopLevelTeam

cmd/help_json_test.go:559–575  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

557}
558
559func TestJSONHelpAuthModeInferenceUsesTopLevelTeam(t *testing.T) {
560 root := &cobra.Command{Use: "dbxcli"}
561 tools := &cobra.Command{Use: "tools"}
562 nestedTeam := &cobra.Command{
563 Use: "team",
564 RunE: func(cmd *cobra.Command, args []string) error { return nil },
565 }
566 root.AddCommand(tools)
567 tools.AddCommand(nestedTeam)
568
569 assertStringSliceEqual(
570 t,
571 "nested non-top-level team auth modes",
572 commandManifestAuthModes(nestedTeam),
573 []string{"personal", "team-access"},
574 )
575}
576
577func TestJSONHelpAuthModeAnnotationOverridesInference(t *testing.T) {
578 root := &cobra.Command{Use: "dbxcli"}

Callers

nothing calls this directly

Calls 2

assertStringSliceEqualFunction · 0.85
commandManifestAuthModesFunction · 0.85

Tested by

no test coverage detected