Matt-Yorkley
581217ea2d
Merge pull request #7239 from Matt-Yorkley/paranoia-scopes
...
Update default scopes with acts_as_paranoid
2021-03-29 15:24:44 +02:00
Matt-Yorkley
e8ddbc0449
Merge pull request #7228 from andrewpbrett/freeze-canceled-orders
...
Remove UI for modifying line items on canceled orders
2021-03-29 15:24:24 +02:00
Pau Pérez Fabregat
325ccdd8d5
Merge pull request #7208 from mkllnk/7130-double-processing-payment
...
Avoid double processing payment
2021-03-29 13:36:21 +02:00
Pau Pérez Fabregat
b8815d2c56
Merge pull request #7159 from Matt-Yorkley/dead-code-adjustment
...
DCOTW: LineItemBasedAdjustmentHandling
2021-03-29 11:46:23 +02:00
Maikel
74b06d16b8
Merge pull request #7209 from openfoodfoundation/dependabot/bundler/rubocop-1.12.0
...
Bump rubocop from 1.11.0 to 1.12.0
2021-03-29 10:59:38 +11:00
Matt-Yorkley
28ee6a66a0
Update line item adjustments spec
...
The `adjustable` and `source` associations are basically the same now, and we'll be deleting the latter soon.
2021-03-27 18:59:50 +00:00
Luis Ramos
f6f9159430
Fix rspec syntax
2021-03-26 23:45:12 +00:00
Luis Ramos
3fe5f04fbc
Fix rspec syntax
2021-03-26 23:04:32 +00:00
Luis Ramos
30ca608fb9
Fix rspec syntax
2021-03-26 23:03:27 +00:00
Luis Ramos
8f7025b8c6
Fix rspec syntax
2021-03-26 23:01:23 +00:00
Luis Ramos
396c379f37
Fix rspec syntax
2021-03-26 22:50:48 +00:00
Luis Ramos
60ae3a8a4f
Fix rspec syntax
2021-03-26 22:37:54 +00:00
Luis Ramos
34771c89f9
Fix rspec syntax
2021-03-26 22:34:16 +00:00
Luis Ramos
f62f958a4c
Fix rspec syntax
2021-03-26 22:29:50 +00:00
Luis Ramos
ad3745f032
Fix rspec syntax
2021-03-26 22:19:16 +00:00
Matt-Yorkley
1b19d4bdee
Update default scopes with acts_as_paranoid
...
Fixes an issue where the LineItem :sorted_by_name_and_unit_value scope was not working with removal of the default scopes on line item and variant, which meant that the join in the scope was excluding soft-deleted items that should not have been excluded.
2021-03-26 18:22:05 +00:00
Andy Brett
19c2c9c1c5
Merge pull request #7175 from openfoodfoundation/7130-notify-on-payment-intent-error
...
Record invalid payment states for debugging
2021-03-26 08:33:07 -07:00
Maikel Linke
4c1f977d26
Return thread syncing to concurrency spec
...
Without syncing the two threads with a lock, the spec could accidentally
pass even if the code is broken. It was accidentally removed during
refactoring in b0fa1464f .
2021-03-26 12:07:46 +11:00
Maikel Linke
cbd730f4eb
Remove left-over comment
...
This spec was fixed before and the comment was outdated.
2021-03-26 12:07:24 +11:00
Andy Brett
563a2758a6
remove UI for modifying line items on canceled orders
2021-03-25 16:52:56 -07:00
Andy Brett
691dd05028
Merge pull request #6956 from andrewpbrett/unit-price-backend
...
Provide actual unit price values in front end shop
2021-03-25 12:50:59 -07:00
Matt-Yorkley
0f5af2d9f1
Merge pull request #6927 from Matt-Yorkley/adjustments-payment-fee
...
[Adjustments] Payment fee adjustment
2021-03-25 17:40:53 +01:00
Andy Brett
be60adbcb3
update class name to singular in spec
2021-03-25 08:51:16 -07:00
Andy Brett
d2828585eb
fix typo in spec
2021-03-25 08:51:15 -07:00
Andy Brett
6ebf45610d
use instance_double in specs
2021-03-25 08:51:15 -07:00
Andy Brett
7319ef7345
use better method and class names
2021-03-25 08:51:15 -07:00
Andy Brett
0afc2d281a
shorten UnitPrices method names
2021-03-25 08:51:15 -07:00
Andy Brett
39fc0707c3
provide unit price values in front end shop
2021-03-25 08:51:15 -07:00
Matt-Yorkley
cbd7c9f4c0
Update adjustments controller collection scope
2021-03-25 15:02:02 +00:00
Pau Pérez Fabregat
b12293d1fb
Merge pull request #6991 from jibees/6494-show-unit-price-in-admin/product-edit-form
...
Show unit price in admin/product edit form
2021-03-25 15:59:09 +01:00
Pau Pérez Fabregat
56d2db8c58
Merge pull request #7194 from Matt-Yorkley/deprecations-validates-id
...
Deprecations: validation definitions
2021-03-25 12:39:33 +01:00
Maikel Linke
ffb4ba5ef5
Style numeric predicate use with Rubocop
2021-03-25 18:07:11 +11:00
Maikel Linke
9fabca134a
Fix and re-activate concurrency spec
2021-03-25 14:35:45 +11:00
Maikel Linke
af5ac2a25e
Extend test coverage of CheckoutController
...
I'm covering the interaction with Stripe here to test for error cases in
the future.
2021-03-25 14:35:45 +11:00
Matt-Yorkley
0ab43d23f9
Replace deprecated reloading by passing true to an association
...
object.relation(true) -> object.relation.reload
2021-03-24 17:51:22 +00:00
Matt-Yorkley
26ed44412f
Update #validates definitions
...
Where the presence of an object is being validated and that object comes from an *association*, we should use `validates :object, presence: true` instead of `validates :object_id, presence: true`.
This does not apply in the same way to validations on uniqueness of certain attributes, such as `validates :object_id, uniqueness...`
2021-03-24 15:43:09 +00:00
Luis Ramos
e2df8937e5
Fix rspec syntax in bulk items controller
2021-03-23 22:00:50 +00:00
Luis Ramos
5549054325
Fix rspec syntax in line items controller
2021-03-23 21:55:58 +00:00
Luis Ramos
b14646ff50
Fix rspec syntax in checkout controller
2021-03-23 21:48:52 +00:00
Luis Ramos
7c8c720976
Fix rspec syntax to work with rails 5.2
2021-03-23 21:41:03 +00:00
Matt-Yorkley
5d1d72b36b
Update Admin::OrdersHelper#order_adjustments_for_display
2021-03-23 18:19:37 +00:00
Matt-Yorkley
5a7792bebc
Update Checkout Restart spec
2021-03-23 18:19:06 +00:00
Matt-Yorkley
3294b33431
Update Payment spec
2021-03-23 18:19:06 +00:00
Matt-Yorkley
8abfd7c3f3
Update Checkout spec
2021-03-23 18:17:50 +00:00
Matt-Yorkley
cb179c794b
Update Paypal spec
2021-03-23 18:17:50 +00:00
Matt-Yorkley
a0e6b64e98
Update Order serializer
2021-03-23 18:17:50 +00:00
Matt-Yorkley
a42651d543
Update Payment fee adjustment
2021-03-23 18:17:50 +00:00
Matt-Yorkley
525fef14b1
Merge pull request #6974 from Matt-Yorkley/adjustments-line-item-fees
...
[Adjustments] Update line item enteprise fees
2021-03-23 19:06:02 +01:00
Andy Brett
b539015647
Merge pull request #7025 from Matt-Yorkley/adjustments-order-taxes
...
[Adjustments] Simplify order tax adjustments
2021-03-23 09:37:44 -07:00
Pau Pérez Fabregat
393ea92dc7
Merge pull request #7177 from coopdevs/fix-balances-order-cycle-report-regression
...
Fix balances order cycle report regression
2021-03-23 10:08:11 +01:00