| 195 | } |
| 196 | |
| 197 | func 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 | |
| 211 | func TestCreateJob(t *testing.T) { |
| 212 | sampleDateString := "2025-08-29T00:00:00Z" |