Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-memory order updater #5872

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d9914f2
Set tax adjustment amount without persistance
harmonymjb Jan 3, 2025
1d501dd
Mark adjustments for removal in OrderTaxation
Noah-Silvera Jan 10, 2025
001c16c
Ignore order adjustments marked for destruction
adammathys Jan 31, 2025
e590083
Add `db-query-matchers` gem
benjaminwil Oct 11, 2024
d1a3687
Copy existing `OrderUpdater` implementation
benjaminwil Oct 11, 2024
fe6839b
Add `persist` flag to `#recalculate`
benjaminwil Oct 11, 2024
e0ed371
Add describe block to Shipment#update_amounts test
Noah-Silvera Oct 25, 2024
a32dc65
Conditionally persist Shipment#update_amounts changes
Noah-Silvera Oct 25, 2024
bc61d6f
Preventing InMemoryOrderUpdater#update_shipment_amounts from making d…
Noah-Silvera Oct 25, 2024
66cb920
Rename method that recalculates shipment state
forkata Nov 8, 2024
0d335d2
Rename method that recalculates payment state
forkata Nov 8, 2024
e3d9cfb
Rename update_ private methods
AlistairNorman Nov 22, 2024
5a22afd
Rename recalculate_adjustments
AlistairNorman Nov 22, 2024
51765f8
Remove describe block for private method
AlistairNorman Nov 22, 2024
15f3a0f
Reorder private methods
AlistairNorman Nov 22, 2024
05bc3bf
Test that changes to item totals are respected
adammathys Jan 30, 2025
261aa22
Pass persist flag to legacy promotion recalculator
adammathys Jan 31, 2025
8fd0eb6
Pass persist to promotion.order_adjuster_class
sofiabesenski4 Dec 6, 2024
532a142
Support conditional persist in promotion chooser
AlistairNorman Feb 7, 2025
7abc583
[TODO] Add TODO so we know what to do
forkata Nov 8, 2024
b52d390
Rename order adjuster subject
Noah-Silvera Feb 14, 2025
5bbf0bd
Add missing Promotions::OrderAdjuster spec
Noah-Silvera Feb 14, 2025
c985cff
WIP: Improving the dry run functionality before implementing persist
Noah-Silvera Feb 14, 2025
7f7e255
WIP dealing with additional persistent in order_adjuster related classes
Noah-Silvera Feb 14, 2025
313454e
Set required line item attributes earlier
senemsoy Feb 28, 2025
07add2a
Don't persist line item on promotion application
senemsoy Feb 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename order adjuster subject
  • Loading branch information
Noah-Silvera authored and stewart committed Mar 7, 2025
commit b52d390a9947d5202924f9108a7254d4d11e4399
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "rails_helper"

RSpec.describe SolidusPromotions::OrderAdjuster, type: :model do
subject(:discounter) { described_class.new(order) }
subject(:order_adjuster) { described_class.new(order) }

let(:line_item) { create(:line_item) }
let(:order) { line_item.order }
Expand All @@ -18,7 +18,7 @@

subject do
benefit
discounter.call
order_adjuster.call
end

context "promotion with conditionless benefit" do
Expand Down Expand Up @@ -144,7 +144,7 @@

subject do
promotion
discounter.call
order_adjuster.call
end

it "creates shipping rate discounts" do
Expand Down