Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dcr-stripe committed Jun 29, 2022
1 parent 18d42a2 commit bbd2867
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v161
v160
43 changes: 35 additions & 8 deletions example/generated_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import (
terminal_location "github.com/stripe/stripe-go/v72/terminal/location"
terminal_reader "github.com/stripe/stripe-go/v72/terminal/reader"
testhelpers_customer "github.com/stripe/stripe-go/v72/testhelpers/customer"
testhelpers_issuing_card "github.com/stripe/stripe-go/v72/testhelpers/issuing/card"
testhelpers_refund "github.com/stripe/stripe-go/v72/testhelpers/refund"
testhelpers_testclock "github.com/stripe/stripe-go/v72/testhelpers/testclock"
testhelpers_treasury_inboundtransfer "github.com/stripe/stripe-go/v72/testhelpers/treasury/inboundtransfer"
Expand Down Expand Up @@ -469,6 +470,40 @@ func TestTestHelpersTreasuryReceivedDebitCreate(t *testing.T) {
assert.NotNil(t, result)
}

func TestSetupAttemptList(t *testing.T) {
params := &stripe.SetupAttemptListParams{
SetupIntent: stripe.String("si_xyz"),
}
params.Limit = stripe.Int64(3)
result := setupattempt.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
}

func TestTestHelpersIssuingCardDeliverCard(t *testing.T) {
params := &stripe.TestHelpersIssuingCardDeliverCardParams{}
result, _ := testhelpers_issuing_card.DeliverCard("card_123", params)
assert.NotNil(t, result)
}

func TestTestHelpersIssuingCardFailCard(t *testing.T) {
params := &stripe.TestHelpersIssuingCardFailCardParams{}
result, _ := testhelpers_issuing_card.FailCard("card_123", params)
assert.NotNil(t, result)
}

func TestTestHelpersIssuingCardReturnCard(t *testing.T) {
params := &stripe.TestHelpersIssuingCardReturnCardParams{}
result, _ := testhelpers_issuing_card.ReturnCard("card_123", params)
assert.NotNil(t, result)
}

func TestTestHelpersIssuingCardShipCard(t *testing.T) {
params := &stripe.TestHelpersIssuingCardShipCardParams{}
result, _ := testhelpers_issuing_card.ShipCard("card_123", params)
assert.NotNil(t, result)
}

func TestAccountLinkCreate(t *testing.T) {
params := &stripe.AccountLinkParams{
Account: stripe.String("acct_xxxxxxxxxxxxx"),
Expand Down Expand Up @@ -1818,14 +1853,6 @@ func TestReviewApprove(t *testing.T) {
assert.NotNil(t, result)
}

func TestSetupAttemptList(t *testing.T) {
params := &stripe.SetupAttemptListParams{}
params.Limit = stripe.Int64(3)
result := setupattempt.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
}

func TestSetupIntentList(t *testing.T) {
params := &stripe.SetupIntentListParams{}
params.Limit = stripe.Int64(3)
Expand Down

0 comments on commit bbd2867

Please sign in to comment.