(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestRESTGetDelete(t *testing.T) { |
| 79 | http := &httpmock.Registry{} |
| 80 | client := newTestClient(http) |
| 81 | |
| 82 | http.Register( |
| 83 | httpmock.REST("DELETE", "applications/CLIENTID/grant"), |
| 84 | httpmock.StatusStringResponse(204, "{}"), |
| 85 | ) |
| 86 | |
| 87 | r := bytes.NewReader([]byte(`{}`)) |
| 88 | err := client.REST("github.com", "DELETE", "applications/CLIENTID/grant", r, nil) |
| 89 | assert.NoError(t, err) |
| 90 | } |
| 91 | |
| 92 | func TestRESTWithFullURL(t *testing.T) { |
| 93 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected