prefer NoError/Error over Nil/NotNil

This commit is contained in:
Stephen Solka 2020-07-19 07:10:03 -04:00 committed by GitHub
parent 44a244b1cb
commit dcd0cda0c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -276,7 +276,7 @@ func TestBuilder_BuildChainWithContext(t *testing.T) {
handlers, err := result.Then(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) }))
if test.expectedError != nil {
require.NotNil(t, err)
require.Error(t, err)
require.Equal(t, test.expectedError.Error(), err.Error())
} else {
require.NoError(t, err)