Skip to content

Commit d2d5c10

Browse files
committed
Notes on Stripe testing
1 parent bbcf8d0 commit d2d5c10

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Hopefully this will be of help to those of you learning RSpec and Rails. If ther
5252
- [Routing Specs & Docs](#routing-specs--docs)
5353
- [Enable Spring for RSpec](#enable-spring-for-rspec)
5454
- [Automated Continuous Integration with Travis CI](#automated-continuous-integration-with-travis-ci)
55+
- [Stripe](#stripe)
5556
- [Contributors](#contributors)
5657

5758
<!-- /MarkdownTOC -->
@@ -311,6 +312,19 @@ Travis CI configuration how-to and example:
311312
- [Our Travis CI build!](https://travis-ci.org/eliotsykes/rspec-rails-examples)
312313
- Our Travis CI badge (hopefully its green): [![Build Status](https://travis-ci.org/eliotsykes/rspec-rails-examples.svg?branch=master)](https://travis-ci.org/eliotsykes/rspec-rails-examples)
313314

315+
316+
# Stripe
317+
318+
The app uses Stripe to handle payments for users wishing to upgrade their membership from standard to premium.
319+
320+
You can test Stripe's JavaScript integration without being dependent on Stripe's test environment network availability. For reliable, faster tests, its usually a good idea to make your tests work independently of any 3rd party environments.
321+
322+
To remove the dependency on Stripe's environment, the test suite relies on Puffing Billy mocking the Stripe HTTP responses in the browser.
323+
324+
- [spec/features/user_upgrades_spec.rb](spec/features/user_upgrades_spec.rb)
325+
- [spec/support/http_cache/frontend/](spec/support/http_cache/frontend/) stores Stripe cached HTTP responses for Puffing Billy
326+
- [Stripe testing guide](https://stripe.com/docs/testing) with card numbers for testing different error states
327+
314328
---
315329

316330
# Contributors

0 commit comments

Comments
 (0)