(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestParseAcceptComment(t *testing.T) { |
| 36 | t.Parallel() |
| 37 | |
| 38 | comment := `/@Accept json,xml,plain,html,mpfd,x-www-form-urlencoded,json-api,json-stream,octet-stream,png,jpeg,gif,application/xhtml+xml,application/health+json` |
| 39 | operation := NewOperation(nil) |
| 40 | err := operation.ParseComment(comment, nil) |
| 41 | assert.NoError(t, err) |
| 42 | assert.Equal(t, |
| 43 | operation.Consumes, |
| 44 | []string{"application/json", |
| 45 | "text/xml", |
| 46 | "text/plain", |
| 47 | "text/html", |
| 48 | "multipart/form-data", |
| 49 | "application/x-www-form-urlencoded", |
| 50 | "application/vnd.api+json", |
| 51 | "application/x-json-stream", |
| 52 | "application/octet-stream", |
| 53 | "image/png", |
| 54 | "image/jpeg", |
| 55 | "image/gif", |
| 56 | "application/xhtml+xml", |
| 57 | "application/health+json"}) |
| 58 | } |
| 59 | |
| 60 | func TestParseAcceptCommentErr(t *testing.T) { |
| 61 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…