Skip to content

Commit

Permalink
merge main into feature payment implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
edmarSoaress authored and eltinMeli committed Feb 9, 2024
1 parent 2f4c115 commit f55b892
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions pkg/payment/payment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestCreate(t *testing.T) {
name: "should_fail_to_send_request",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
return nil, fmt.Errorf("some error")
},
Expand All @@ -97,7 +97,7 @@ func TestCreate(t *testing.T) {
name: "should_fail_to_unmarshaling_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader("invalid json")
stringReadCloser := io.NopCloser(stringReader)
Expand All @@ -118,7 +118,7 @@ func TestCreate(t *testing.T) {
name: "should_return_formatted_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader(string(createResponse))
stringReadCloser := io.NopCloser(stringReader)
Expand Down Expand Up @@ -191,7 +191,7 @@ func TestSearch(t *testing.T) {
name: "should_fail_to_send_request",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
return nil, fmt.Errorf("some error")
},
Expand All @@ -208,7 +208,7 @@ func TestSearch(t *testing.T) {
name: "should_fail_to_unmarshaling_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader("invalid json")
stringReadCloser := io.NopCloser(stringReader)
Expand All @@ -229,7 +229,7 @@ func TestSearch(t *testing.T) {
name: "should_return_formatted_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader(string(searchResponse))
stringReadCloser := io.NopCloser(stringReader)
Expand Down Expand Up @@ -316,7 +316,7 @@ func TestGet(t *testing.T) {
name: "should_fail_to_send_request",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
return nil, fmt.Errorf("some error")
},
Expand All @@ -333,7 +333,7 @@ func TestGet(t *testing.T) {
name: "should_fail_to_unmarshaling_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader("invalid json")
stringReadCloser := io.NopCloser(stringReader)
Expand All @@ -354,7 +354,7 @@ func TestGet(t *testing.T) {
name: "should_return_formatted_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader(string(getResponse))
stringReadCloser := io.NopCloser(stringReader)
Expand Down Expand Up @@ -427,7 +427,7 @@ func TestCancel(t *testing.T) {
name: "should_fail_to_send_request",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
return nil, fmt.Errorf("some error")
},
Expand All @@ -444,7 +444,7 @@ func TestCancel(t *testing.T) {
name: "should_fail_to_unmarshaling_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader("invalid json")
stringReadCloser := io.NopCloser(stringReader)
Expand All @@ -465,7 +465,7 @@ func TestCancel(t *testing.T) {
name: "should_return_formatted_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader(string(cancelResponse))
stringReadCloser := io.NopCloser(stringReader)
Expand Down Expand Up @@ -538,7 +538,7 @@ func TestCapture(t *testing.T) {
name: "should_fail_to_send_request",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
return nil, fmt.Errorf("some error")
},
Expand All @@ -555,7 +555,7 @@ func TestCapture(t *testing.T) {
name: "should_fail_to_unmarshaling_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader("invalid json")
stringReadCloser := io.NopCloser(stringReader)
Expand All @@ -576,7 +576,7 @@ func TestCapture(t *testing.T) {
name: "should_return_formatted_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader(string(captureResponse))
stringReadCloser := io.NopCloser(stringReader)
Expand Down Expand Up @@ -650,7 +650,7 @@ func TestCaptureAmount(t *testing.T) {
name: "should_fail_to_send_request",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
return nil, fmt.Errorf("some error")
},
Expand All @@ -667,7 +667,7 @@ func TestCaptureAmount(t *testing.T) {
name: "should_fail_to_unmarshaling_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader("invalid json")
stringReadCloser := io.NopCloser(stringReader)
Expand All @@ -688,7 +688,7 @@ func TestCaptureAmount(t *testing.T) {
name: "should_return_formatted_response",
fields: fields{
config: &config.Config{
HTTPClient: &httpclient.Mock{
Requester: &httpclient.Mock{
DoMock: func(req *http.Request) (*http.Response, error) {
stringReader := strings.NewReader(string(captureAmountResponse))
stringReadCloser := io.NopCloser(stringReader)
Expand Down

0 comments on commit f55b892

Please sign in to comment.