Last active
January 8, 2020 21:17
-
-
Save dvdantunes/5bb5857650f57bec6cfda31e362d12eb to your computer and use it in GitHub Desktop.
Spree snipets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spree | |
******** | |
* Create new user | |
u = Spree::User.new(first_name: 'david', last_name: 'antunes', email: '[email protected]', password: 'spree123', password_confirmation: 'spree123', rut: 241237036) | |
u.save! | |
* Spree defase override test | |
docker-compose run website rake deface:get_result['spree/checkout/_confirm'] | |
* Test credit card (Bogus Gateway) | |
https://stackoverflow.com/questions/19794660/rails-spree-cant-checkout-in-test-env-unable-to-authorize-credit-card-bogus | |
To pass the checkout steps in other to place a successful test order follow the following steps. | |
Name on card | |
Enter 'Bogus Gateway' | |
Credit card number | |
Enter each of these in turn to simulate different types of transaction: | |
1: to simulate a successful transaction | |
2: to simulate a failed transaction | |
3: to simulate an Exception (this generates a message indicating that an error has occurred with the provider.) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment