Matt-Yorkley
78eb5d23f9
Update TaxRatesController spec
...
BigDecimal was throwing an error here (in Rails 5) unless it received a string, but I think this is actually an issue with the way params were being passed in the relevant spec, as opposed to the controller itself.
2021-02-09 11:57:00 +00:00
Matt-Yorkley
d9bd0e8f0e
Use alternate method for setting request.referer in controller specs
...
Apparently stubbing `request.referer` is tricky business in Rails 5... :shrugs:
2021-02-09 11:57:00 +00:00
Matt-Yorkley
9851c9a762
Merge pull request #6678 from Matt-Yorkley/soft-deprecate-tax-rates
...
Introduce soft-deprecation strategy when modifying tax rates
2021-02-05 13:16:40 +01:00
Pau Perez
4a5869b60c
Remove ability to toggle mail delivery
...
OFN requires mails to work so there's no point in having this
conditional with the maintenance cost it entails.
2021-01-25 13:27:44 +01:00
Andy Brett
903b2e7ff4
whitelist allowed events to be sent to a Payment
2021-01-21 09:18:29 -08:00
Andy Brett
ab5ffead1d
require that the redirect url be to stripe.com and over https
2021-01-21 09:18:29 -08:00
Andy Brett
d76db9ee51
update payment controller spec to move payment to pending
2021-01-21 09:18:29 -08:00
Andy Brett
802e49bed3
add PaymentMailer and send email if payment auth is required
2021-01-21 08:24:01 -08:00
Matt-Yorkley
8cc4c6a63f
Introduce soft-deprecation strategy when modifying tax rates
...
If an admin changes the amount on a tax rate, and that rate has been used by adjustments in the past, we need to soft-delete and clone it to preserve the data integrity of previous adjustments that were created using that rate.
2021-01-15 13:38:03 +00:00
Andy Brett
c29d57b54e
Merge pull request #6369 from Matt-Yorkley/broken-variants
...
Fix variant data inconsistencies
2021-01-13 11:10:44 -08:00
Matt-Yorkley
ff962c1c9b
Change various Mailer invocations from #deliver_now to #deliver_later
2021-01-08 23:18:55 +00:00
Andy Brett
79aaa38173
update outdated spec
...
This spec was added as part of cbac916e66 - now that we're updating the unit_value to be 1, we expect this not to fail
2020-12-22 19:46:40 -08:00
Pau Pérez Fabregat
fa812364ff
Merge pull request #6453 from andrewpbrett/fix-void-payment-error
...
fix #5829 (Voiding an initial payment (i.e. a full refund) after partially refunding the order is not possible with Stripe-SCA)
2020-12-14 09:48:41 +01:00
Andy Brett
e866e983f6
add spec for partially refunded SCA orders
2020-12-07 14:51:47 -08:00
Luis Ramos
5b00868c6f
Allow mutable strings in some specs
2020-12-03 06:38:24 -08:00
Luis Ramos
2b8f0abe49
Try some mass auto-correct adding frozen-string-literal to all specs
2020-12-03 06:38:24 -08:00
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