test for a new func
This commit is contained in:
parent
512aa5c6e8
commit
2ba427dfc3
@ -64,3 +64,9 @@ func TestNewServerError(t *testing.T) {
|
||||
assert.NotNil(t, err.Response)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAsClientError(t *testing.T) {
|
||||
assert.Nil(t, AsClientError(nil))
|
||||
assert.Nil(t, AsClientError(errors.New("arbitrary")))
|
||||
assert.NotNil(t, AsClientError(NewCriticalHTTPError(errors.New("arbitrary"))))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user