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

Function TestRenderJSONError

render/render_test.go:43–49  ·  render/render_test.go::TestRenderJSONError
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestRenderJSONError(t *testing.T) {
44 w := httptest.NewRecorder()
45 data := make(chan int)
46
47 // json: unsupported type: chan int
48 require.Error(t, (JSON{data}).Render(w))
49}
50
51func TestRenderIndentedJSON(t *testing.T) {
52 w := httptest.NewRecorder()

Callers

nothing calls this directly

Calls 2

RenderMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected