Skip to content

Commit

Permalink
Cover 100% from search request
Browse files Browse the repository at this point in the history
  • Loading branch information
gdeandradero committed Mar 6, 2024
1 parent ba64dd0 commit bbbf552
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions pkg/invoice/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ package invoice
import (
"context"
"fmt"
"github.com/mercadopago/sdk-go/pkg/config"
"github.com/mercadopago/sdk-go/pkg/internal/httpclient"
"io"
"net/http"
"os"
"reflect"
"strings"
"testing"
"time"

"github.com/google/uuid"
"github.com/mercadopago/sdk-go/pkg/config"
"github.com/mercadopago/sdk-go/pkg/internal/httpclient"
)

var (
Expand Down Expand Up @@ -166,7 +168,11 @@ func TestSearch(t *testing.T) {
args: args{
ctx: context.Background(),
request: SearchRequest{
Limit: "12",
Limit: "10",
Offset: "10",
Filters: map[string]string{
"iD": uuid.NewString(),
},
},
},
want: &SearchResponse{
Expand Down
12 changes: 9 additions & 3 deletions pkg/preapprovalplan/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ package preapprovalplan
import (
"context"
"fmt"
"github.com/mercadopago/sdk-go/pkg/config"
"github.com/mercadopago/sdk-go/pkg/internal/httpclient"
"io"
"net/http"
"os"
"reflect"
"strings"
"testing"
"time"

"github.com/google/uuid"
"github.com/mercadopago/sdk-go/pkg/config"
"github.com/mercadopago/sdk-go/pkg/internal/httpclient"
)

var (
Expand Down Expand Up @@ -397,7 +399,11 @@ func TestSearch(t *testing.T) {
args: args{
ctx: context.Background(),
request: SearchRequest{
Limit: "10",
Limit: "10",
Offset: "10",
Filters: map[string]string{
"iD": uuid.NewString(),
},
},
},
want: &SearchResponse{
Expand Down

0 comments on commit bbbf552

Please sign in to comment.