Closed jordan-brough closed 8 years ago
Nice find! As for the integration tests I agree with using something like VCR, however if we're considering getting rid of the AmazonMws
and replace it with the pay_with_amazon
gem we should probably do that first before writing the tests
When
Spree::Config[:auto_capture]
is enabled thenSpree::Gateway::Amazon#purchase
will get called, which does this:So we don't want
authorize
to perform a capture, because we'll be capturing immediately afterward and the second capture would fail.Note: The best way I can think of to test something like this would be via an integration test (with some VCR cassettes perhaps) and we don't have that yet. It would be great to start making some integration specs at some point.