Maikel Linke
dcb6f4676d
Remove all unnecessary spec_helper require statements
...
The `.rspec` file is doing this for us.
2026-01-21 12:35:34 +11:00
Carlos Chitty
63d284e81a
Use Orders::WorkflowService#complete! and #advance_to_payment in specs to replace code causing Style/NestedModifier rubocop offenses
...
Rewrite the loop "break unless a = order.next! while !order.delivery?" to correct the offenses. Not adding a helper because the change was only needed in a couple of places.
2025-06-04 12:46:58 -04:00
cyrillefr
67f5ae811b
Fixes RSpecRailsInferredSpecType offenses in remaining controllers
2025-05-20 12:51:50 +02:00
cyrillefr
5063a772f0
Fixes RSpec Rails HaveHttpStatus cop in controllers
2025-05-14 10:58:04 +02:00
Joseph Johansen
5086f2d8b5
Fix rubocop Style/Send group
2024-07-23 14:18:26 +01:00
Gaetan Craig-Riou
f38e13b1a0
Fix orders controller spec
2024-07-03 10:17:49 +10:00
Maikel Linke
6317fe1b71
Disable RSpec monkey patching
2024-05-09 12:24:41 +10:00
Maikel Linke
bd6b0ddbf3
Enforce RSpec expect(..).not_to over to_not
2024-03-07 16:57:54 +11:00
Neal Chambers
29df80945d
Fix Style/HashSyntax
2023-09-20 23:46:26 +09:00
Neal Chambers
5b6f45931c
Fix Layout/LineLength
2023-06-26 13:06:56 +09:00
Jean-Baptiste Bellet
aaa9bac4dd
Remove white_label feature toggle
...
White label is now activated for everyone.
+ add mock for `spec/controllers/spree/orders_controller_spec.rb`
2023-05-15 17:10:50 +02:00
Maikel Linke
9998025687
Remove useless test header setup for emails
...
Once upon a time we needed a helper to set the `from` header of emails.
This is now set in the ApplicationMailer and not necessary any more.
2023-04-20 12:15:34 +10:00
Jean-Baptiste Bellet
89036db666
Do not use a preference, but create a new column for hide_ofn_navigation
2023-03-30 09:19:17 +11:00
Jean-Baptiste Bellet
4ad2a1a723
Prefer a concern that set a variable instead of a global helper
...
Therefor, for the right controllers, simply implements:
```
include WhiteLabel
before_action :hide_ofn_navigation, only: [:show, :edit]
```
This is mort robust, since we're working in a controller level, not parsing URLs...
2023-03-30 09:17:57 +11:00
cyrillefr
7c24f6b26f
Remove I18n keys from Pay/Stripe/Chkout Ctrllers spec
2023-02-15 11:08:19 +01:00
binarygit
3c741f0686
Add flash after an order is cancelled
2022-07-13 18:45:43 +05:45
Matt-Yorkley
8a18a4de66
Clear up redirecting logic and path building
2022-01-29 10:08:51 +00:00
Matt-Yorkley
11c6ce16ea
Move payment-authorizing tests to stripe controller spec
2022-01-14 19:41:08 +00:00
Matt-Yorkley
9f49a84e7f
Clarify use of access tokens used for viewing order details as a guest user
...
There are 4 or 5 different places in the app where we reference a :token and params[:token] for completely different purposes (they're not even vaguely the *same* token).
This is an attempt to clarify the places in the app where we use params[:token] in relation to *orders*, for allowing guest users (who are not logged in) to view details of an order they have placed (like after checkout completion), and differentiate it from the various other places where params[:token] can actually be used for something entirely different!
2021-12-16 13:35:55 +00:00
Maikel
9affc6a945
Merge pull request #8108 from Matt-Yorkley/andand
...
Remove `andand` gem
2021-09-10 15:06:00 +10:00
Matt-Yorkley
1d5077061e
Remove andand
...
This old gem implemented some functionality for handling nils which is no longer needed, as it's provided natively by Ruby with the &. operator.
2021-09-08 14:28:31 +01:00
Matt-Yorkley
32a2610e7d
Refactor arguments for PaymentIntentValidator
2021-07-09 13:42:41 +01:00
Matt-Yorkley
e5a85caef6
Refactor Stripe::PaymentIntentValidator
...
This makes the interface a lot simpler and moves the fetching of the information it requires inside the service itself.
2021-07-09 13:39:52 +01:00
Andy Brett
9b1da14380
mark payment failed after failed authorization
2021-06-29 11:54:51 -07:00
Pau Pérez Fabregat
db993652c4
Merge branch 'master' into payment-states
2021-06-18 12:20:26 +02:00
Andy Brett
d9aa1b054a
update payments to be in requires_authorization state in specs
2021-06-17 18:10:41 -07:00
Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Matt-Yorkley
42ff2307fa
Update specs that use removed #add_variant and #remove_variant methods in test setup
2021-06-04 17:10:50 +01:00
Matt-Yorkley
d5d76d9b9a
Move private controller methods to private
2021-06-04 17:10:50 +01:00
Andy Brett
77c384633b
specify payment intent ID in stripe stub
2021-06-01 22:34:04 +01:00
Luis Ramos
85508f45b4
Replace be_success on test_reponse with status 200
...
In rails 6 response.success? is not supported.
2021-06-01 22:33:12 +01:00
Andy Brett
b367001b95
Merge pull request #7641 from luisramos0/order_path
...
[Rails 6.1] Fix view specs
2021-05-24 14:41:32 -07:00
Luis Ramos
fb560089b9
Replace usages of update_attributes! with usage of update!
2021-05-19 09:54:25 -07:00
Matt-Yorkley
794216713a
Ensure payment is processed if order is in completed state
2021-05-16 23:03:07 +01:00
Matt-Yorkley
16e3af9b49
Update OrderController spec
2021-05-16 20:11:45 +01:00
Luis Ramos
b1896733ca
Fix routes
2021-05-14 00:08:20 +01:00
Andy Brett
d29ef0d7b1
Merge branch 'master' into make-specs-accurate
2021-05-10 16:10:33 -07:00
Pau Perez
fd5e0fd60f
Properly mock validator and extend tests
...
Tests were passing but not due to the expected reason. While at it, we
extended the assertions to be more precise.
2021-05-07 08:35:54 +02:00
Luis Ramos
a2de86c23e
Replace be_success on test_reponse with status 200
...
In rails 6 response.success? is not supported.
2021-05-06 23:51:30 +01:00
Pau Perez
2147584daf
Validate intents against Stripe and display errors
...
Now the existing validation is redundant. It's Stripe's API who does
that now. It's up to them to decide what's a valid intent.
2021-05-06 16:19:01 +02:00
Matt-Yorkley
2f19428b40
Update orders controller
2021-04-04 19:19:06 +01:00
Luis Ramos
8f7025b8c6
Fix rspec syntax
2021-03-26 23:01:23 +00:00
Matt-Yorkley
4c64aaed77
Remove callbacks in Adjustment that call order.update!
2021-03-11 11:20:01 +00:00
Matt-Yorkley
945605e3a8
Rename Shipment #adjustment to #fee_adjustment for clarity
2021-03-04 14:27:02 +00:00
Matt-Yorkley
f94f424b63
Update fee fetching in controller tests
2021-03-04 14:27:02 +00:00
Matt-Yorkley
0e3429dc35
Merge pull request #6758 from Matt-Yorkley/enterprise-fees-refactor
...
Enterprise fees refactor
2021-02-22 17:59:18 +01:00
Matt-Yorkley
cc55e9eeda
Improve coverage in orders_controller_spec
2021-02-19 11:17:59 +00:00
Matt-Yorkley
d4750b9f26
Improve clarity of orders controller test
2021-02-19 11:17:59 +00:00
Matt-Yorkley
9303d61db1
Update specs
2021-02-19 11:17:58 +00:00
Andy Brett
05e762ff21
add controller specs for confirming payment intent
2021-02-15 17:09:38 -08:00