Specify allow_guest_orders attribute

This commit is contained in:
Jean-Baptiste Bellet
2022-01-06 14:38:58 +01:00
parent b1524aa0bd
commit 6be2fbb0b9

View File

@@ -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