(value interface{})
| 668 | } |
| 669 | |
| 670 | func (s *ApplicationSuite) withJSON(value interface{}) { |
| 671 | jsonVal, _ := json.Marshal(value) |
| 672 | s.ctx.Request = httptest.NewRequest("POST", "/application", bytes.NewBuffer(jsonVal)) |
| 673 | s.ctx.Request.Header.Set("Content-Type", "application/json") |
| 674 | } |
| 675 | |
| 676 | // A modified version of https://stackoverflow.com/a/20397167/4244993 from Attila O. |
| 677 | func upload(values map[string]*os.File) (contentType string, buffer bytes.Buffer, err error) { |
no outgoing calls
no test coverage detected