ruby-on-railsspreebraintreesolidus

Is it possible to generate a fake Braintree Client Token or VCR the request?


I have an integration/feature spec in my Spree Rails app that already VCR records the final payment request. However, I can notice still the external call to Braintree to calculate the client token.

I looked in the docs and I did not see a test object that I could use when it generates the token.

Is it possible to either have a test object that will provide a test Braintree client token? Or is it just better to VCR record that initial request?


Solution

  • I found that when it came to integration tests, using VCR does record and prevent the external call to braintree.

    I do with the gem did somehow logs that the request was never actually made externally when using VCR.