Skip to content

Commit

Permalink
Provide anonymous user instead of nil
Browse files Browse the repository at this point in the history
As explained in
https://github.com/openfoodfoundation/spree_auth_devise/blob/0181835fb6ac77a05191d26f6f32a0f4a548d851/app/models/spree/user.rb#L26-L32,
all orders have a user so checking out as a guest is just using an
automatically generated user by means of `.anonymous!`.
  • Loading branch information
sauloperez committed Dec 27, 2018
1 parent 1007add commit 3e79365
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/features/consumer/shopping/orders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
end

context "when checking out as an anonymous guest" do
let(:user) { nil }
let(:user) { Spree::User.anonymous! }

it "allows the user to see the details" do
# Cannot load the page without token
Expand Down

0 comments on commit 3e79365

Please sign in to comment.