(t *testing.T)
| 429 | } |
| 430 | |
| 431 | func TestIssuesService_Lock(t *testing.T) { |
| 432 | t.Parallel() |
| 433 | client, mux, _ := setup(t) |
| 434 | |
| 435 | mux.HandleFunc("/repos/o/r/issues/1/lock", func(w http.ResponseWriter, r *http.Request) { |
| 436 | testMethod(t, r, "PUT") |
| 437 | |
| 438 | w.WriteHeader(http.StatusNoContent) |
| 439 | }) |
| 440 | |
| 441 | ctx := t.Context() |
| 442 | if _, err := client.Issues.Lock(ctx, "o", "r", 1, nil); err != nil { |
| 443 | t.Errorf("Issues.Lock returned error: %v", err) |
| 444 | } |
| 445 | |
| 446 | const methodName = "Lock" |
| 447 | testBadOptions(t, methodName, func() (err error) { |
| 448 | _, err = client.Issues.Lock(ctx, "\n", "\n", -1, nil) |
| 449 | return err |
| 450 | }) |
| 451 | |
| 452 | testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { |
| 453 | return client.Issues.Lock(ctx, "o", "r", 1, nil) |
| 454 | }) |
| 455 | } |
| 456 | |
| 457 | func TestIssuesService_LockWithReason(t *testing.T) { |
| 458 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…