#BidBird®

1 messages · Page 1 of 1 (latest)

daring umbraBOT
calm bone
hazy heart
#

ok, cool let me take a look

#

I see, so it wouldn't allow a test suite to run against it in CI?

calm bone
#

right, you should make test mode requests or create your own mocks if this basic repo doesn't fit your needs

hazy heart
#

I have a test suite for the 2018 charges api and am trying to update. It uses interfaces and PaymentGateway and FakePaymentGateway. However, we could create a charge without pinging the server.

If we create PaymentIntents with the test_api key will stripe potentially ban the app when we run CI?

#

Is that what you mean by test mode requests?

calm bone
#

got it, thanks for the context! that's right, you should create PaymentIntents using your test mode keys. when you run CI, you could mock up some of the failures based on the kinds of failures you trigger in test mode so you don't always make requests to the API

hazy heart
#

Ok, there’s not that many tests. Maybe 50 or so unit tests. That shouldn’t be a problem for our account right?

calm bone
#

I recommend creating your own mocks just in case

hazy heart
#

Ok. Never had a problem before but a stripe dev recently mentioned to not ping the server as much as possible.
Is it possible to create a mock payment intent? Or is that one thing that should be tested on the api