(t *testing.T)
| 1577 | } |
| 1578 | |
| 1579 | func TestContextRenderRedirectWith201(t *testing.T) { |
| 1580 | w := httptest.NewRecorder() |
| 1581 | c, _ := CreateTestContext(w) |
| 1582 | |
| 1583 | c.Request, _ = http.NewRequest(http.MethodPost, "http://example.com", nil) |
| 1584 | c.Redirect(http.StatusCreated, "/resource") |
| 1585 | c.Writer.WriteHeaderNow() |
| 1586 | |
| 1587 | assert.Equal(t, http.StatusCreated, w.Code) |
| 1588 | assert.Equal(t, "/resource", w.Header().Get("Location")) |
| 1589 | } |
| 1590 | |
| 1591 | func TestContextRenderRedirectAll(t *testing.T) { |
| 1592 | c, _ := CreateTestContext(httptest.NewRecorder()) |
nothing calls this directly
no test coverage detected
searching dependent graphs…