Skip to content

Commit

Permalink
Improve OrdersHelper spec and delete dead code
Browse files Browse the repository at this point in the history
The removed test here was checking for adjustments that have an amount of zero and are eligible. If the amount is zero, it will already be marked as ineligible.
  • Loading branch information
Matt-Yorkley committed Mar 11, 2021
1 parent c5a47b5 commit 29c5703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/helpers/admin/orders_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
let(:order) { create(:order) }

it "selects eligible adjustments" do
adjustment = create(:adjustment, adjustable: order, amount: 1)
adjustment = create(:adjustment, order: order, adjustable: order, amount: 1)

expect(helper.order_adjustments_for_display(order)).to eq [adjustment]
end

it "filters shipping method adjustments" do
create(:adjustment, adjustable: order, amount: 1, originator_type: "Spree::ShippingMethod")
create(:adjustment, order: order, adjustable: order, amount: 1, originator_type: "Spree::ShippingMethod")

expect(helper.order_adjustments_for_display(order)).to eq []
end
Expand Down

0 comments on commit 29c5703

Please sign in to comment.