INNER CODE UNIT · Go
TestAgentsCommand_ShowsHelp
jrswab/axe · cmd/agents_test.go:33
func TestAgentsCommand_ShowsHelp(t *testing.T) {
buf := new(bytes.Buffer)
rootCmd.SetOut(buf)
rootCmd.SetErr(new(bytes.Buffer))
rootCmd.SetArgs([]string{"agents"})
err := rootCmd.Execute()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
output := buf.String()
if !strings.Contains(output, "agent") {
t.Error("agents help output missing expected content")
}
if !strings.Contains(output, "Available Commands") {
t.Error("agents help output missing subcommand listing")
}