Skip to content

Commit

Permalink
Merge pull request #52 from friendlycart/return-order-for-shipped-orders
Browse files Browse the repository at this point in the history
FriendlyPromotionDiscounter: Always return @order
  • Loading branch information
mamhoff authored Oct 25, 2023
2 parents 6a1b777 + dc21c5f commit 9949557
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize(order)
end

def call
return nil if order.shipped?
return order if order.shipped?

order.reset_current_discounts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

subject { described_class.new(order).call }

it "returns nil" do
expect(subject).to be nil
it "returns the order unmodified" do
expect(order).not_to receive(:reset_current_discounts)
expect(subject).to eq(order)
end
end
end

0 comments on commit 9949557

Please sign in to comment.