vendor: update all dependencies
This commit is contained in:
parent
0b6fba34a3
commit
eb87cf6f12
2008 changed files with 352633 additions and 1004750 deletions
53
vendor/github.com/stretchr/testify/assert/http_assertions_test.go
generated
vendored
53
vendor/github.com/stretchr/testify/assert/http_assertions_test.go
generated
vendored
|
@ -19,21 +19,52 @@ func httpError(w http.ResponseWriter, r *http.Request) {
|
|||
w.WriteHeader(http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
func TestHTTPStatuses(t *testing.T) {
|
||||
func TestHTTPSuccess(t *testing.T) {
|
||||
assert := New(t)
|
||||
mockT := new(testing.T)
|
||||
|
||||
assert.Equal(HTTPSuccess(mockT, httpOK, "GET", "/", nil), true)
|
||||
assert.Equal(HTTPSuccess(mockT, httpRedirect, "GET", "/", nil), false)
|
||||
assert.Equal(HTTPSuccess(mockT, httpError, "GET", "/", nil), false)
|
||||
mockT1 := new(testing.T)
|
||||
assert.Equal(HTTPSuccess(mockT1, httpOK, "GET", "/", nil), true)
|
||||
assert.False(mockT1.Failed())
|
||||
|
||||
assert.Equal(HTTPRedirect(mockT, httpOK, "GET", "/", nil), false)
|
||||
assert.Equal(HTTPRedirect(mockT, httpRedirect, "GET", "/", nil), true)
|
||||
assert.Equal(HTTPRedirect(mockT, httpError, "GET", "/", nil), false)
|
||||
mockT2 := new(testing.T)
|
||||
assert.Equal(HTTPSuccess(mockT2, httpRedirect, "GET", "/", nil), false)
|
||||
assert.True(mockT2.Failed())
|
||||
|
||||
assert.Equal(HTTPError(mockT, httpOK, "GET", "/", nil), false)
|
||||
assert.Equal(HTTPError(mockT, httpRedirect, "GET", "/", nil), false)
|
||||
assert.Equal(HTTPError(mockT, httpError, "GET", "/", nil), true)
|
||||
mockT3 := new(testing.T)
|
||||
assert.Equal(HTTPSuccess(mockT3, httpError, "GET", "/", nil), false)
|
||||
assert.True(mockT3.Failed())
|
||||
}
|
||||
|
||||
func TestHTTPRedirect(t *testing.T) {
|
||||
assert := New(t)
|
||||
|
||||
mockT1 := new(testing.T)
|
||||
assert.Equal(HTTPRedirect(mockT1, httpOK, "GET", "/", nil), false)
|
||||
assert.True(mockT1.Failed())
|
||||
|
||||
mockT2 := new(testing.T)
|
||||
assert.Equal(HTTPRedirect(mockT2, httpRedirect, "GET", "/", nil), true)
|
||||
assert.False(mockT2.Failed())
|
||||
|
||||
mockT3 := new(testing.T)
|
||||
assert.Equal(HTTPRedirect(mockT3, httpError, "GET", "/", nil), false)
|
||||
assert.True(mockT3.Failed())
|
||||
}
|
||||
|
||||
func TestHTTPError(t *testing.T) {
|
||||
assert := New(t)
|
||||
|
||||
mockT1 := new(testing.T)
|
||||
assert.Equal(HTTPError(mockT1, httpOK, "GET", "/", nil), false)
|
||||
assert.True(mockT1.Failed())
|
||||
|
||||
mockT2 := new(testing.T)
|
||||
assert.Equal(HTTPError(mockT2, httpRedirect, "GET", "/", nil), false)
|
||||
assert.True(mockT2.Failed())
|
||||
|
||||
mockT3 := new(testing.T)
|
||||
assert.Equal(HTTPError(mockT3, httpError, "GET", "/", nil), true)
|
||||
assert.False(mockT3.Failed())
|
||||
}
|
||||
|
||||
func TestHTTPStatusesWrapper(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue