From c6ce11e17af9a4b62bbbc082e5f13bb3a3b656a6 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 7 Mar 2026 23:54:00 +0000 Subject: test(api): update elaborate and validate tests to use AgentConfig --- internal/api/validate_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/api/validate_test.go') diff --git a/internal/api/validate_test.go b/internal/api/validate_test.go index 5a1246b..c3d7b1f 100644 --- a/internal/api/validate_test.go +++ b/internal/api/validate_test.go @@ -23,7 +23,7 @@ func TestValidateTask_Success(t *testing.T) { wrapperJSON, _ := json.Marshal(wrapper) srv.validateCmdPath = createFakeClaude(t, string(wrapperJSON), 0) - body := `{"name":"Test Task","claude":{"instructions":"Run go test ./... and report results."}}` + body := `{"name":"Test Task","agent":{"instructions":"Run go test ./... and report results."}}` req := httptest.NewRequest("POST", "/api/tasks/validate", bytes.NewBufferString(body)) req.Header.Set("Content-Type", "application/json") w := httptest.NewRecorder() @@ -46,7 +46,7 @@ func TestValidateTask_Success(t *testing.T) { func TestValidateTask_MissingInstructions(t *testing.T) { srv, _ := testServer(t) - body := `{"name":"Test Task","claude":{"instructions":""}}` + body := `{"name":"Test Task","agent":{"instructions":""}}` req := httptest.NewRequest("POST", "/api/tasks/validate", bytes.NewBufferString(body)) req.Header.Set("Content-Type", "application/json") w := httptest.NewRecorder() @@ -61,7 +61,7 @@ func TestValidateTask_MissingInstructions(t *testing.T) { func TestValidateTask_MissingName(t *testing.T) { srv, _ := testServer(t) - body := `{"name":"","claude":{"instructions":"Do something useful."}}` + body := `{"name":"","agent":{"instructions":"Do something useful."}}` req := httptest.NewRequest("POST", "/api/tasks/validate", bytes.NewBufferString(body)) req.Header.Set("Content-Type", "application/json") w := httptest.NewRecorder() @@ -77,7 +77,7 @@ func TestValidateTask_BadJSONFromClaude(t *testing.T) { srv, _ := testServer(t) srv.validateCmdPath = createFakeClaude(t, "not valid json at all", 0) - body := `{"name":"Test Task","claude":{"instructions":"Do something useful."}}` + body := `{"name":"Test Task","agent":{"instructions":"Do something useful."}}` req := httptest.NewRequest("POST", "/api/tasks/validate", bytes.NewBufferString(body)) req.Header.Set("Content-Type", "application/json") w := httptest.NewRecorder() -- cgit v1.2.3