| 184 | } |
| 185 | |
| 186 | func 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 | |
| 200 | func TestCreateJob(t *testing.T) { |
| 201 | sampleDateString := "2025-08-29T00:00:00Z" |