(t *testing.T)
| 472 | } |
| 473 | |
| 474 | func TestIssuesService_Unlock(t *testing.T) { |
| 475 | t.Parallel() |
| 476 | client, mux, _ := setup(t) |
| 477 | |
| 478 | mux.HandleFunc("/repos/o/r/issues/1/lock", func(w http.ResponseWriter, r *http.Request) { |
| 479 | testMethod(t, r, "DELETE") |
| 480 | |
| 481 | w.WriteHeader(http.StatusNoContent) |
| 482 | }) |
| 483 | |
| 484 | ctx := t.Context() |
| 485 | if _, err := client.Issues.Unlock(ctx, "o", "r", 1); err != nil { |
| 486 | t.Errorf("Issues.Unlock returned error: %v", err) |
| 487 | } |
| 488 | |
| 489 | const methodName = "Unlock" |
| 490 | testBadOptions(t, methodName, func() (err error) { |
| 491 | _, err = client.Issues.Unlock(ctx, "\n", "\n", 1) |
| 492 | return err |
| 493 | }) |
| 494 | |
| 495 | testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { |
| 496 | return client.Issues.Unlock(ctx, "o", "r", 1) |
| 497 | }) |
| 498 | } |
| 499 | |
| 500 | func TestIsPullRequest(t *testing.T) { |
| 501 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…