From 6be2fbb0b942c789dc5723206f616a4e8f3982ff Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Thu, 6 Jan 2022 14:38:58 +0100 Subject: [PATCH] Specify allow_guest_orders attribute --- spec/system/consumer/split_checkout_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/system/consumer/split_checkout_spec.rb b/spec/system/consumer/split_checkout_spec.rb index 70841e27fa..d2b4d998fe 100644 --- a/spec/system/consumer/split_checkout_spec.rb +++ b/spec/system/consumer/split_checkout_spec.rb @@ -8,7 +8,7 @@ describe "As a consumer, I want to checkout my order", js: true do let!(:zone) { create(:zone_with_member) } let(:supplier) { create(:supplier_enterprise) } - let(:distributor) { create(:distributor_enterprise, charges_sales_tax: true) } + let(:distributor) { create(:distributor_enterprise, charges_sales_tax: true, allow_guest_orders: false) } let(:product) { create(:taxed_product, supplier: supplier, price: 10, zone: zone, tax_rate_amount: 0.1) } @@ -53,6 +53,8 @@ describe "As a consumer, I want to checkout my order", js: true do context "as a guest user" do before do + distributor.update!(allow_guest_orders: true) + order.update!(distributor_id: distributor.id) visit checkout_path end