Merge pull request #13437 from dacook/remove-unused-method

Remove unused method
This commit is contained in:
Maikel
2025-07-28 16:29:15 +10:00
committed by GitHub
2 changed files with 0 additions and 14 deletions

View File

@@ -5,10 +5,6 @@ module CheckoutHelper
order.ship_address == order.bill_address
end
def guest_checkout_allowed?
current_order.distributor.allow_guest_orders?
end
def checkout_adjustments_for(order, opts = {})
exclude = opts[:exclude] || {}
reject_zero_amount = opts.fetch(:reject_zero_amount, true)

View File

@@ -131,16 +131,6 @@ RSpec.describe CheckoutHelper do
end
end
it "knows if guests can checkout" do
distributor = create(:distributor_enterprise)
order = create(:order, distributor:)
allow(helper).to receive(:current_order) { order }
expect(helper.guest_checkout_allowed?).to be true
order.distributor.allow_guest_orders = false
expect(helper.guest_checkout_allowed?).to be false
end
describe "#checkout_adjustments_for" do
let(:order) { create(:order_with_totals_and_distribution) }
let(:enterprise_fee) { create(:enterprise_fee, amount: 123) }