INNER CODE UNIT · Go
TestAgentsList_WithoutDescription
jrswab/axe · cmd/agents_test.go:143
func TestAgentsList_WithoutDescription(t *testing.T) {
agentsDir := setupTestAgentsDir(t)
writeTestAgent(t, agentsDir, "bare", "name = \"bare\"\nmodel = \"openai/gpt-4o\"")
buf := new(bytes.Buffer)
rootCmd.SetOut(buf)
rootCmd.SetErr(new(bytes.Buffer))
rootCmd.SetArgs([]string{"agents", "list"})
err := rootCmd.Execute()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
want := "bare\n"
if buf.String() != want {
t.Errorf("output = %q, want %q", buf.String(), want)
}