(t *testing.T)
| 1934 | } |
| 1935 | |
| 1936 | func TestContextAbortWithError(t *testing.T) { |
| 1937 | w := httptest.NewRecorder() |
| 1938 | c, _ := CreateTestContext(w) |
| 1939 | |
| 1940 | c.AbortWithError(http.StatusUnauthorized, errors.New("bad input")).SetMeta("some input") //nolint: errcheck |
| 1941 | |
| 1942 | assert.Equal(t, http.StatusUnauthorized, w.Code) |
| 1943 | assert.Equal(t, abortIndex, c.index) |
| 1944 | assert.True(t, c.IsAborted()) |
| 1945 | } |
| 1946 | |
| 1947 | func TestContextClientIP(t *testing.T) { |
| 1948 | c, _ := CreateTestContext(httptest.NewRecorder()) |
nothing calls this directly
no test coverage detected