MCPcopy
hub / github.com/gin-gonic/gin / TestContextNegotiationFormat2

Function TestContextNegotiationFormat2

context_test.go:1793–1799  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1791}
1792
1793func TestContextNegotiationFormat2(t *testing.T) {
1794 c, _ := CreateTestContext(httptest.NewRecorder())
1795 c.Request, _ = http.NewRequest(http.MethodPost, "/", nil)
1796 c.Request.Header.Add("Accept", "image/tiff-fx")
1797
1798 assert.Empty(t, c.NegotiateFormat("image/tiff"))
1799}
1800
1801func TestContextIsAborted(t *testing.T) {
1802 c, _ := CreateTestContext(httptest.NewRecorder())

Callers

nothing calls this directly

Calls 2

CreateTestContextFunction · 0.85
NegotiateFormatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…