diff --git a/pkg/payment/payment_test.go b/pkg/payment/payment_test.go index 77b8751b..4022660c 100644 --- a/pkg/payment/payment_test.go +++ b/pkg/payment/payment_test.go @@ -223,7 +223,7 @@ func TestSearch(t *testing.T) { ctx: context.Background(), }, want: nil, - wantErr: "error unmarshaling response: invalid character 'i' looking for beginning of value", + wantErr: "invalid character 'i' looking for beginning of value", }, { name: "should_return_formatted_response", @@ -242,6 +242,9 @@ func TestSearch(t *testing.T) { }, args: args{ ctx: context.Background(), + dto: SearchRequest{ + Limit: "30", + }, }, want: &SearchResponse{ Paging: PagingResponse{ @@ -348,7 +351,7 @@ func TestGet(t *testing.T) { ctx: context.Background(), }, want: nil, - wantErr: "error unmarshaling response: invalid character 'i' looking for beginning of value", + wantErr: "invalid character 'i' looking for beginning of value", }, { name: "should_return_formatted_response", @@ -459,7 +462,7 @@ func TestCancel(t *testing.T) { ctx: context.Background(), }, want: nil, - wantErr: "error unmarshaling response: invalid character 'i' looking for beginning of value", + wantErr: "invalid character 'i' looking for beginning of value", }, { name: "should_return_formatted_response", @@ -570,7 +573,7 @@ func TestCapture(t *testing.T) { ctx: context.Background(), }, want: nil, - wantErr: "error unmarshaling response: invalid character 'i' looking for beginning of value", + wantErr: "invalid character 'i' looking for beginning of value", }, { name: "should_return_formatted_response", @@ -682,7 +685,7 @@ func TestCaptureAmount(t *testing.T) { ctx: context.Background(), }, want: nil, - wantErr: "error unmarshaling response: invalid character 'i' looking for beginning of value", + wantErr: "invalid character 'i' looking for beginning of value", }, { name: "should_return_formatted_response", diff --git a/pkg/paymentmethod/client_test.go b/pkg/paymentmethod/client_test.go index cd11e2eb..359f2a21 100644 --- a/pkg/paymentmethod/client_test.go +++ b/pkg/paymentmethod/client_test.go @@ -80,7 +80,7 @@ func TestList(t *testing.T) { ctx: context.Background(), }, want: nil, - wantErr: "error unmarshaling response: invalid character 'i' looking for beginning of value", + wantErr: "invalid character 'i' looking for beginning of value", }, { name: "should_return_formatted_response", @@ -129,7 +129,7 @@ func TestList(t *testing.T) { if err != nil { gotErr = err.Error() } - + if gotErr != tt.wantErr { t.Errorf("client.List() error = %v, wantErr %v", err, tt.wantErr) }