stripe-perl icon indicating copy to clipboard operation
stripe-perl copied to clipboard

use stripe-mock for unit tests

Open sherrardb opened this issue 4 years ago • 0 comments

in perusing some of the other SDKs, specifically looking for how they test various Source types, i discovered various test tokens, like src_123, which don't seem to work against the Stripe servers, even in test mode.

my eventual conclusion was that these SDKs are using stripe-mock.

this setup is clearly beneficial for:

  • being able to test the SDK more-thoroughly at user install time
  • avoiding unnecessary test-object creation, and periodic object deletion, for developers

i have no idea how API versioning intersects with stripe-mock, or the ability to test complex flows, such as auth/capture. and i am sure that there are other complexities to consider.

mostly a note to future-self.

sherrardb avatar Feb 08 '20 16:02 sherrardb