Simplify test of adjustments

This commit is contained in:
Maikel Linke
2022-08-11 16:35:43 +10:00
committed by Konrad
parent 52843de1da
commit b297299838

View File

@@ -145,11 +145,8 @@ describe CheckoutHelper, type: :helper do
adjustments = helper.checkout_adjustments_for(order)
shipping_adjustment = order.shipment_adjustments.first
expect(adjustments).to include shipping_adjustment
admin_fee_summary = adjustments.reject { |a| a.id == shipping_adjustment.id }.first
expect(admin_fee_summary.label).to eq "Enterprise Fee"
expect(admin_fee_summary.amount).to eq 123
expect(adjustments).to match_array [shipping_adjustment, fee_adjustment]
end
context "tax rate adjustments" do