Skip to content

Commit

Permalink
[TODO] Add TODO so we know what to do
Browse files Browse the repository at this point in the history
  • Loading branch information
forkata authored and adammathys committed Jan 31, 2025
1 parent 2c886b3 commit 92fc679
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
In-Memory Order Updater TODO
===

- [x] Add additional cases to item_total_updater_spec (doesn't currently account for included adjustments)
- [x] Consider Sofia's recommendation to break this class into POROs to simplify testing
- [x] Add test coverage for `recalculate_item_total` when line item totals change
- [x] Scope handling of tax adjustments in `InMemoryOrderUpdater` to *not* marked for destruction
- [x] Scope handling of tax adjustments in `OrderUpdater` to *not* marked for destruction
- [x] Ensure order-level tax adjustments (like Colorado delivery) are scoped out of tax total and adjustment total calculations
- [x] Handle persistence in `update_taxes`
- [x] ~Write the `InMemoryOrderAdjuster` (also, should we rename this to `InMemoryOrderPromotionAdjuster`)~
- [ ] Handle persistence in all implementations of `promotion.order_adjuster_class`
- [ ] Investigate if any promotion actions write to the database when calling `compute_amount`
- [ ] Test coverage to ensure state changes aren't persisted (if someone changes current implementation)
- [ ] We should be able to blow up if something tries to persist
- https://github.com/sds/db-query-matchers/blob/0deaaac360f43e6cc15c03a7fca8425cf65dd703/lib/db_query_matchers/make_database_queries.rb#L74-L82
- https://api.rubyonrails.org/classes/ActiveSupport/Notifications.html#method-c-subscribed
- "By calling this in memory order updater, we are making a contract with the user that it will be in memory"
- "This is really something which theoritically should be covered in tests"

0 comments on commit 92fc679

Please sign in to comment.