Skip to content

Commit

Permalink
Fixed scenario "guest order with registered email" in order_spec
Browse files Browse the repository at this point in the history
Spree order factory requires user (we are setting it to nil below so, no impact on the test)
Defining shipping method is not necessary for this test
  • Loading branch information
luisramos0 committed Sep 7, 2018
1 parent 8bcdf05 commit 3f4935f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/models/spree/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -634,15 +634,15 @@
end

describe "when a guest order is placed with a registered email" do
let(:order) { create(:order_with_totals_and_distribution, user: nil) }
let(:order) { create(:order_with_totals_and_distribution, user: user) }
let(:payment_method) { create(:payment_method, distributors: [order.distributor]) }
let(:shipping_method) { create(:shipping_method, distributors: [order.distributor]) }
let(:user) { create(:user, email: '[email protected]') }

before do
order.bill_address = create(:address)
order.ship_address = create(:address)
order.shipping_method = shipping_method
# order.shipping_method = shipping_method
order.email = user.email
order.user = nil
order.state = 'cart'
Expand Down

0 comments on commit 3f4935f

Please sign in to comment.