1
0
mirror of synced 2024-11-24 05:56:04 +03:00

test for a new func

This commit is contained in:
Pavel 2023-12-29 11:37:01 +03:00
parent 512aa5c6e8
commit 2ba427dfc3

View File

@ -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"))))
}