Closed jlecour closed 8 years ago
You can use the hardcoded key for your tests.
@seuros Hey, I'm intrigued. Did I miss something obvious ? I know nothing about an hard-coded key.
I'll try that and report back. Thank you @seuros.
Thanks for your help @seuros. @jlecour I'll close this for now, but do come back to us if you have any further queries.
It remains a bit unclear to me how I should test my implementation code.
What special behavior is triggered by the key cqFfFrWfCcb7UadHNxx2C9Lo6Djw8ZduLi7J9USTmu8bhxxpju
?
Is it just a special account that is pruned every now and then (like a testing database) ?
Thanks
@jlecour there is no special behaviour with this account (ClientId and Passphrase) given in https://github.com/Mangopay/mangopay2-ruby-sdk/blob/master/spec/spec_helper.rb (ie no pruning/modifications made on our side unless you ask us to). It's just a test account like any other account in sandbox. You can create your own test account if you like at https://www.mangopay.com/signup/create-sandbox/
@jlecour we use a sandbox account (like the one used by the gem itself) and then record the requests with VCR so that future test runs do not need to hit the API.
For recording front-end requests (like tokenizing the credit card) we use Puffing Billy.
Hi,
I was wondering what is the recommended testing strategy when using this gem. I've been using it within an application for basic hand-tested features, but now I need to implement more complexe behavior and I want to set up automated tests.
It would be nice if the gem provided some stubs (and ideally some matchers too), in the same spirit as the fake credit cards provided for payments in the sandbox environment.
Thank you for providing this SDK. :clap: