(t *testing.T)
| 283 | } |
| 284 | |
| 285 | func TestOrganizationsService_CancelInvite(t *testing.T) { |
| 286 | t.Parallel() |
| 287 | client, mux, _ := setup(t) |
| 288 | |
| 289 | mux.HandleFunc("/orgs/o/invitations/1", func(w http.ResponseWriter, r *http.Request) { |
| 290 | testMethod(t, r, "DELETE") |
| 291 | w.WriteHeader(http.StatusNoContent) |
| 292 | }) |
| 293 | |
| 294 | ctx := t.Context() |
| 295 | _, err := client.Organizations.CancelInvite(ctx, "o", 1) |
| 296 | if err != nil { |
| 297 | t.Errorf("Organizations.CancelInvite returned error: %v", err) |
| 298 | } |
| 299 | |
| 300 | const methodName = "CancelInvite" |
| 301 | testBadOptions(t, methodName, func() (err error) { |
| 302 | _, err = client.Organizations.CancelInvite(ctx, "\n", 1) |
| 303 | return err |
| 304 | }) |
| 305 | |
| 306 | testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { |
| 307 | return client.Organizations.CancelInvite(ctx, "o", 1) |
| 308 | }) |
| 309 | } |
| 310 | |
| 311 | func TestOrganizationsService_RemoveMember_invalidOrg(t *testing.T) { |
| 312 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…