(t *testing.T)
| 139 | } |
| 140 | |
| 141 | func TestHTTPStatusesWrapper(t *testing.T) { |
| 142 | t.Parallel() |
| 143 | |
| 144 | assert := New(t) |
| 145 | mockAssert := New(new(testing.T)) |
| 146 | |
| 147 | assert.Equal(mockAssert.HTTPSuccess(httpOK, "GET", "/", nil), true) |
| 148 | assert.Equal(mockAssert.HTTPSuccess(httpRedirect, "GET", "/", nil), false) |
| 149 | assert.Equal(mockAssert.HTTPSuccess(httpError, "GET", "/", nil), false) |
| 150 | |
| 151 | assert.Equal(mockAssert.HTTPRedirect(httpOK, "GET", "/", nil), false) |
| 152 | assert.Equal(mockAssert.HTTPRedirect(httpRedirect, "GET", "/", nil), true) |
| 153 | assert.Equal(mockAssert.HTTPRedirect(httpError, "GET", "/", nil), false) |
| 154 | |
| 155 | assert.Equal(mockAssert.HTTPError(httpOK, "GET", "/", nil), false) |
| 156 | assert.Equal(mockAssert.HTTPError(httpRedirect, "GET", "/", nil), false) |
| 157 | assert.Equal(mockAssert.HTTPError(httpError, "GET", "/", nil), true) |
| 158 | } |
| 159 | |
| 160 | func httpHelloName(w http.ResponseWriter, r *http.Request) { |
| 161 | name := r.FormValue("name") |
nothing calls this directly
no test coverage detected