Matt-Yorkley
3bfa903912
Revert "Move Spree::Admin::BaseController to Admin::BaseController"
2020-11-27 14:11:57 +01:00
Andy Brett
85d99f3bf2
Merge branch 'master' into controllers
2020-11-20 08:12:03 -08:00
Andy Brett
17202ff39c
move gateway_error require to lib/spree/core.rb
2020-11-10 14:55:56 -08:00
Luis Ramos
543a9592c7
Adapt spec to routes without spree
2020-11-04 12:15:45 +00:00
Luis Ramos
66ba9ff73d
Move Spree::Admin::BaseController to Admin::BaseController
2020-10-31 09:51:37 +00:00
Andy Brett
8d9b33abe8
update spec with new param structure
2020-10-29 09:18:24 -07:00
Andy Brett
8f21b66b96
add controller spec for updating available units
2020-10-29 09:17:49 -07:00
Matt-Yorkley
f22c7fcdfb
Merge pull request #6151 from luisramos0/stripe_save_cards
...
Stripe Feature Tests: checkout with saved a card
2020-10-24 23:29:29 +02:00
Matt-Yorkley
489529d30e
Merge pull request #5729 from luisramos0/image_settings
...
Remove Image settings page and standardise Paperclip styles
2020-10-22 15:58:14 +02:00
Luis Ramos
b267f542d1
Merge pull request #5980 from luisramos0/spree_clean_up
...
[Bye bye spree] Some clean up fixes to make it all work without spree
2020-10-20 18:52:54 +01:00
Luis Ramos
0f06195baa
Remove Image settings page, these settings will come from ofn-install now
2020-10-20 11:20:37 +01:00
Luis Ramos
f5f9a733fb
Fix rubocop issue, long module, by extracting StripeStubs to a separate helper module
2020-10-16 12:37:42 +01:00
Maikel
8c65498661
Merge pull request #5998 from andrewpbrett/shipping-per-pound
...
Per-pound shipping calculator
2020-10-16 15:27:57 +11:00
Luis Ramos
d54ddacc05
Merge pull request #5887 from luisramos0/orders
...
[Bye bye Spree] Bring models order, line_item and other related from spree_core
2020-10-15 08:49:05 +01:00
Luis Ramos
9288250194
Merge pull request #5981 from luisramos0/spree_ability
...
[Bye bye spree] Bring classes related to abilities to OFN
2020-10-12 15:26:30 +01:00
Luis Ramos
ef70c1fc5c
Make helper more flexible and use it in a spec
2020-10-02 19:20:32 +01:00
Luis Ramos
83456f94e3
Simplify test by re-using helper stripe mock
2020-10-02 19:12:56 +01:00
Matt-Yorkley
70bd2161ba
Rename Stripe Connect factory for clarity
2020-09-19 12:55:31 +01:00
Luis Ramos
60ef32300b
No need to test code with different ability setup, this was a good spec for spree, in ofn we use and test the static auth config in Ability
2020-09-17 14:18:51 +01:00
Luis Ramos
f81d4596aa
Use correct updater
2020-09-17 14:06:51 +01:00
Luis Ramos
ec8dfd668d
Use ofn's calculator in all tests and add missing translation
2020-09-17 13:59:41 +01:00
Luis Ramos
e0cb7a29bf
Add helper prefix to helper calls
2020-09-17 13:58:45 +01:00
Andy Brett
246934d8ba
update preference name in factor and specs
2020-09-12 14:49:42 -07:00
Andy Brett
adb29a9c8f
add preferred_unit to weight shipping calculator
2020-09-07 08:41:48 -07:00
Andy Brett
5793f0103d
Revert "Add a per-pound calculator and a spec for it"
...
This reverts commit e8eadcbf39 .
2020-09-07 07:50:59 -07:00
Andy Brett
e8eadcbf39
Add a per-pound calculator and a spec for it
2020-09-06 09:03:06 -07:00
Luis Ramos
907afe3131
Remove dependency to BarAbility from spree_core
2020-08-22 18:14:53 +01:00
Luis Ramos
a2ebc614d9
Rename AuthenticationWorkflow to AuthenticationHelper
2020-07-27 15:32:35 +01:00
Luis Ramos
f1a3814c0d
Rename login_as_enterprise_user to a more specific name controller_login_as_enterprise_user
2020-07-27 14:44:25 +01:00
Luis Ramos
8e84754f35
Rename login_as_admin to a more specific name controller_login_as_admin
2020-07-27 14:44:25 +01:00
Luis Ramos
1af4bf6994
Replace usage of create_enterprise_user with :user factory
2020-07-27 14:44:23 +01:00
Pau Perez
c0f72f89f2
Handle #refund! as we do with #credit!
2020-07-23 20:24:31 +02:00
Pau Perez
0f0a704147
Skip source validation when applying credit
...
The original payment may not be valid because its credit card may be
expired. Stripe gives this as a valid scenario returning a success and
we should do too.
When creating the credit payment we end up validating all sources in
a chain as follows.
```
Payment being persisted -> source payment -> original credit card.
```
The source payment was valid when created (It would not be persisted
otherwise) but its source card may now be expired, and that's legit.
There was also an issue with the `#invalidate_old_payments` callback. It
was causing the original payment to be validated again and thus the
credit payment failed to be persisted due to the original credit card
being expired. Switching this callback to use `#update_column` skips
validations and so we don't validate the source payment. We only care
about the state there, so it should be fine.
2020-07-23 20:24:31 +02:00
Pau Perez
73b1b1f172
DRY specs and fix rubocop failures
2020-07-23 20:24:31 +02:00
Pau Perez
59da07de66
Handle all errors when dealing with payment event
...
This basically catches ActiveRecord::RecordInvalid caused by an invalid
credit record, for instance, but also other situations we haven't
forseen.
2020-07-23 20:24:31 +02:00
Pau Perez
26ed601996
Test the payment controller handles GatewayError
...
After that, we can TDD a second one that also handles validation errors.
2020-07-23 20:24:31 +02:00
Pau Pérez Fabregat
426c536750
Merge pull request #5677 from luisramos0/remove_spree_root_path
...
Bring ControllerHelpers from Spree and remove spree root path
2020-07-21 16:15:21 +02:00
Luis Ramos
7f1797de58
Adapt specs to the move of unauthorized route from the spree routes to the main app routes
2020-07-15 14:54:52 +01:00
Luis Ramos
1666ffb191
Remove try_spree_current_user
...
This can be done because the method is defined in OFN's ApplicationController, so spree_current_user is available in all controllers
2020-07-15 14:53:35 +01:00
Matt-Yorkley
c009fed6be
Update StrongParams for Pin Payments
2020-07-15 14:00:19 +02:00
Luis Ramos
5e8438c446
Move all calculators outside the spree namespace
2020-07-07 17:26:23 +01:00
Luis Ramos
6555f8bfba
Add specs to cover stripeSCA refunds
...
Duplication between stripe connect and stripeSCA is done on purpose so we can easily delete stripeConnect code when the migration is done
2020-07-01 18:13:27 +01:00
Luis Ramos
ce493866f9
Extract refunds specs from payments controller spec
2020-07-01 13:19:38 +01:00
Luis Ramos
ecb1920fa9
Move payment_controller_spec to specific folder so we can break it in more specific parts
2020-07-01 13:14:39 +01:00
Cillian O'Ruanaidh
a9664e103d
Merge latest :master into :drop-blockenspiel branch and resolve conflicts related to Rubocop fixes.
2020-06-29 18:11:08 +01:00
Luis Ramos
f848a89a00
Rename update_attributes to update #rails4
2020-06-22 16:51:43 +01:00
Luis Ramos
473fee19eb
Fix rubocop issues
2020-06-22 13:03:18 +01:00
Pau Pérez Fabregat
db80992326
Merge branch 'master' into drop-blockenspiel
2020-06-19 12:12:10 +02:00
Luis Ramos
f6e3e01a10
Extract permitted payment_source attributes from checkout to use them in the backoffice payments controller
...
Add spec to verify payment source attributes are passed
2020-06-18 09:54:34 +01:00
Cillian O'Ruanaidh
ba126d5afc
Move the bulk coop controller specs to the order management engine.
...
Also deleting old :bulk_coop_report action from the Spree::Admin::ReportsController.
2020-06-13 15:42:26 +01:00