(t *testing.T)
| 1721 | } |
| 1722 | |
| 1723 | func TestContextNegotiationNotSupport(t *testing.T) { |
| 1724 | w := httptest.NewRecorder() |
| 1725 | c, _ := CreateTestContext(w) |
| 1726 | c.Request, _ = http.NewRequest(http.MethodPost, "", nil) |
| 1727 | |
| 1728 | c.Negotiate(http.StatusOK, Negotiate{ |
| 1729 | Offered: []string{MIMEPOSTForm}, |
| 1730 | }) |
| 1731 | |
| 1732 | assert.Equal(t, http.StatusNotAcceptable, w.Code) |
| 1733 | assert.Equal(t, abortIndex, c.index) |
| 1734 | assert.True(t, c.IsAborted()) |
| 1735 | } |
| 1736 | |
| 1737 | func TestContextNegotiationFormat(t *testing.T) { |
| 1738 | c, _ := CreateTestContext(httptest.NewRecorder()) |
nothing calls this directly
no test coverage detected