(t *testing.T)
| 1047 | func (*TestRender) WriteContentType(http.ResponseWriter) {} |
| 1048 | |
| 1049 | func TestContextRenderIfErr(t *testing.T) { |
| 1050 | w := httptest.NewRecorder() |
| 1051 | c, _ := CreateTestContext(w) |
| 1052 | |
| 1053 | c.Render(http.StatusOK, &TestRender{}) |
| 1054 | |
| 1055 | assert.Equal(t, errorMsgs{&Error{Err: errTestRender, Type: 1}}, c.Errors) |
| 1056 | } |
| 1057 | |
| 1058 | // Tests that the response is serialized as JSON |
| 1059 | // and Content-Type is set to application/json |
nothing calls this directly
no test coverage detected
searching dependent graphs…