mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Specify allow_guest_orders attribute
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user