mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
Merge pull request #13437 from dacook/remove-unused-method
Remove unused method
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user