mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
Adapt consumer/shopping/orders_spec to use an order with a nil user to test a guest checkout, which is what happens in the real checkout
This commit is contained in:
@@ -31,7 +31,14 @@ feature "Order Management", js: true do
|
||||
end
|
||||
|
||||
context "when checking out as an anonymous guest" do
|
||||
let(:user) { Spree::User.anonymous! }
|
||||
let!(:customer) { nil }
|
||||
let!(:order) do
|
||||
create(:order_with_credit_payment,
|
||||
user: nil,
|
||||
email: "guest@user.com",
|
||||
distributor: distributor,
|
||||
order_cycle: order_cycle)
|
||||
end
|
||||
|
||||
it "allows the user to see the details" do
|
||||
# Cannot load the page without token
|
||||
|
||||
Reference in New Issue
Block a user