(t *testing.T)
| 43 | } |
| 44 | |
| 45 | func TestEventsErrorFromServer(t *testing.T) { |
| 46 | client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server error"))) |
| 47 | assert.NilError(t, err) |
| 48 | res := client.Events(t.Context(), EventsListOptions{}) |
| 49 | err = <-res.Err |
| 50 | assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal)) |
| 51 | } |
| 52 | |
| 53 | func TestEvents(t *testing.T) { |
| 54 | const expectedURL = "/events" |