We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65d7518 commit 4f2b79bCopy full SHA for 4f2b79b
utils/api/api_test.go
@@ -110,4 +110,14 @@ func TestCallAndCheckSuccess(t *testing.T) {
110
})
111
assert.NoError(t, err)
112
113
+
114
+ t.Run("api call successful, empty response", func(t *testing.T) {
115
+ errMessage := "response error"
116
+ parentCtx := context.Background()
117
+ _, err := CallAndCheckSuccess(parentCtx, errMessage,
118
+ func(ctx context.Context) (*struct{}, *_http.Response, error) {
119
+ return &struct{}{}, &_http.Response{StatusCode: 200}, errors.New(errMessage)
120
+ })
121
+ assert.True(t, commonerrors.Any(err, commonerrors.ErrMarshalling))
122
123
}
0 commit comments