Skip to content

Commit 01244fa

Browse files
committed
fix(ios): fix unit test error
1 parent 6fa5b56 commit 01244fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

appstore/validator_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ func TestCannotReadBody(t *testing.T) {
286286
testResponse := http.Response{Body: ioutil.NopCloser(errReader(0))}
287287

288288
ctx := context.Background()
289-
if client.parseResponse(&testResponse, IAPResponse{}, ctx, IAPRequest{}) == nil {
289+
if _, err := client.parseResponse(&testResponse, IAPResponse{}, ctx, IAPRequest{}); err == nil {
290290
t.Errorf("expected redirectToSandbox to fail to read the body")
291291
}
292292
}
@@ -296,7 +296,7 @@ func TestCannotUnmarshalBody(t *testing.T) {
296296
testResponse := http.Response{Body: ioutil.NopCloser(strings.NewReader(`{"status": true}`))}
297297

298298
ctx := context.Background()
299-
if client.parseResponse(&testResponse, StatusResponse{}, ctx, IAPRequest{}) == nil {
299+
if _, err := client.parseResponse(&testResponse, StatusResponse{}, ctx, IAPRequest{}); err == nil {
300300
t.Errorf("expected redirectToSandbox to fail to unmarshal the data")
301301
}
302302
}

0 commit comments

Comments
 (0)