From 35c9f050cd66e8cfa4c4b47465fd7a01150bd0f3 Mon Sep 17 00:00:00 2001 From: edmarSoaress Date: Wed, 7 Feb 2024 15:01:43 -0300 Subject: [PATCH] merge with develop and adjust test --- pkg/payment/payment_test.go | 13 ++++++++----- pkg/paymentmethod/client_test.go | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) 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) }