From 567f6b5fa400169f1a20810c430b235995239d91 Mon Sep 17 00:00:00 2001 From: Bruna Campos Date: Tue, 12 Mar 2024 11:05:04 -0300 Subject: [PATCH] remove invoice IT (#34) --- test/integration/invoice/invoice_test.go | 54 ------------------------ 1 file changed, 54 deletions(-) delete mode 100644 test/integration/invoice/invoice_test.go diff --git a/test/integration/invoice/invoice_test.go b/test/integration/invoice/invoice_test.go deleted file mode 100644 index 4d3fadd6..00000000 --- a/test/integration/invoice/invoice_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package integration - -import ( - "context" - "os" - "testing" - - "github.com/mercadopago/sdk-go/pkg/config" - "github.com/mercadopago/sdk-go/pkg/invoice" -) - -func TestInvoice(t *testing.T) { - t.Run("should_get_invoice", func(t *testing.T) { - cfg, err := config.New(os.Getenv("ACCESS_TOKEN")) - if err != nil { - t.Fatal(err) - } - - client := invoice.NewClient(cfg) - - result, err := client.Get(context.Background(), "id") - if result == nil { - t.Error("invoice can't be nil") - } - if err != nil { - t.Errorf(err.Error()) - } - }) - - t.Run("should_search_invoice", func(t *testing.T) { - cfg, err := config.New(os.Getenv("ACCESS_TOKEN")) - if err != nil { - t.Fatal(err) - } - - filters := invoice.SearchRequest{ - Limit: 10, - Offset: 10, - Filters: map[string]string{ - "preapproval_id": "id", - }, - } - - client := invoice.NewClient(cfg) - result, err := client.Search(context.Background(), filters) - - if result == nil { - t.Error("invoice can't be nil") - } - if err != nil { - t.Errorf(err.Error()) - } - }) -}