(t *testing.T)
| 45 | func (nopCloser) Close() error { return nil } |
| 46 | |
| 47 | func TestRequestSentCorrectly(t *testing.T) { |
| 48 | r := &Response{ |
| 49 | Status: StatusSuccess, |
| 50 | url: "http://pre-signed-S3-url-for-response", |
| 51 | } |
| 52 | |
| 53 | client := &mockClient{ |
| 54 | DoFunc: func(req *http.Request) (*http.Response, error) { |
| 55 | assert.NotContains(t, req.Header, "Content-Type") |
| 56 | return &http.Response{ |
| 57 | StatusCode: http.StatusOK, |
| 58 | Body: nopCloser{bytes.NewBufferString("")}, |
| 59 | }, nil |
| 60 | }, |
| 61 | } |
| 62 | |
| 63 | assert.NoError(t, r.sendWith(client)) |
| 64 | } |
| 65 | |
| 66 | func TestRequestForbidden(t *testing.T) { |
| 67 | r := &Response{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…