github.com/stripe/stripe-go/v76@v76.25.0/client/api_test.go (about)

     1  package client
     2  
     3  import (
     4  	"testing"
     5  
     6  	assert "github.com/stretchr/testify/require"
     7  )
     8  
     9  func TestAPIInit(t *testing.T) {
    10  	api := API{}
    11  	api.Init("sk_test_123", nil)
    12  	assert.Equal(t, "sk_test_123", api.Charges.Key)
    13  }
    14  
    15  func TestAPINew(t *testing.T) {
    16  	api := New("sk_test_123", nil)
    17  	assert.Equal(t, "sk_test_123", api.Charges.Key)
    18  }