Skip to content

Commit 2ff3806

Browse files
committed
Add token command to human catalog
1 parent 9b86152 commit 2ff3806

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

internal/commands/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var commandCatalogTitles = map[string]string{
3333
var commandCatalogGroups = map[string][]string{
3434
"core": {"activity", "board", "card", "column", "comment", "search", "step"},
3535
"collaboration": {"notification", "pin", "reaction", "tag", "user"},
36-
"admin": {"auth", "account", "identity", "webhook", "upload", "migrate"},
36+
"admin": {"auth", "account", "identity", "token", "webhook", "upload", "migrate"},
3737
"utilities": {"setup", "signup", "completion", "doctor", "config", "skill", "commands", "version"},
3838
}
3939

internal/commands/commands_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,25 @@ func TestCommandsFilterFindsActivity(t *testing.T) {
7070
}
7171
}
7272

73+
func TestCommandsFilterFindsToken(t *testing.T) {
74+
mock := NewMockClient()
75+
SetTestModeWithSDK(mock)
76+
SetTestFormat(output.FormatStyled)
77+
defer resetTest()
78+
79+
if err := commandsCmd.RunE(commandsCmd, []string{"token"}); err != nil {
80+
t.Fatalf("unexpected error: %v", err)
81+
}
82+
83+
raw := TestOutput()
84+
if !strings.Contains(raw, "token") || !strings.Contains(raw, "create, delete, list") {
85+
t.Fatalf("expected filtered catalog to include token actions, got:\n%s", raw)
86+
}
87+
if strings.Contains(raw, "No commands match") {
88+
t.Fatalf("expected token to be discoverable, got:\n%s", raw)
89+
}
90+
}
91+
7392
func TestCommandsJSONOutputReturnsStructuredCatalog(t *testing.T) {
7493
mock := NewMockClient()
7594
result := SetTestModeWithSDK(mock)

0 commit comments

Comments
 (0)