MCPcopy
hub / github.com/cli/cli / TestCreateJobRequiresRepoAndProblemStatement

Function TestCreateJobRequiresRepoAndProblemStatement

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

Source from the content-addressed store, hash-verified

184}
185
186func TestCreateJobRequiresRepoAndProblemStatement(t *testing.T) {
187 client := &CAPIClient{}
188
189 _, err := client.CreateJob(context.Background(), "", "only-repo", "", "", "")
190 assert.EqualError(t, err, "owner and repo are required")
191 _, err = client.CreateJob(context.Background(), "only-owner", "", "", "", "")
192 assert.EqualError(t, err, "owner and repo are required")
193 _, err = client.CreateJob(context.Background(), "", "", "", "", "")
194 assert.EqualError(t, err, "owner and repo are required")
195
196 _, err = client.CreateJob(context.Background(), "owner", "repo", "", "", "")
197 assert.EqualError(t, err, "problem statement is required")
198}
199
200func TestCreateJob(t *testing.T) {
201 sampleDateString := "2025-08-29T00:00:00Z"

Callers

nothing calls this directly

Calls 1

CreateJobMethod · 0.95

Tested by

no test coverage detected