MCPcopy Create free account
hub / github.com/cli/cli / TestCreateJobRequiresRepoAndProblemStatement

Function TestCreateJobRequiresRepoAndProblemStatement

pkg/cmd/agent-task/capi/job_test.go:197–209  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

195}
196
197func TestCreateJobRequiresRepoAndProblemStatement(t *testing.T) {
198 client := &CAPIClient{}
199
200 _, err := client.CreateJob(context.Background(), "", "only-repo", "", "", "")
201 assert.EqualError(t, err, "owner and repo are required")
202 _, err = client.CreateJob(context.Background(), "only-owner", "", "", "", "")
203 assert.EqualError(t, err, "owner and repo are required")
204 _, err = client.CreateJob(context.Background(), "", "", "", "", "")
205 assert.EqualError(t, err, "owner and repo are required")
206
207 _, err = client.CreateJob(context.Background(), "owner", "repo", "", "", "")
208 assert.EqualError(t, err, "problem statement is required")
209}
210
211func TestCreateJob(t *testing.T) {
212 sampleDateString := "2025-08-29T00:00:00Z"

Callers

nothing calls this directly

Calls 1

CreateJobMethod · 0.95

Tested by

no test coverage detected