mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fixing one regression bug
This commit is contained in:
@@ -45,7 +45,7 @@ Spree::CheckoutController.class_eval do
|
||||
past = Spree::Order.order("id desc").where(:email => email).where("state != 'cart'").limit(8)
|
||||
if order = past.detect(&:bill_address)
|
||||
bill_address = order.bill_address.clone if order.bill_address
|
||||
ship_address = order.ship_address.clone if order.ship_address if order.shipping_method.require_ship_address
|
||||
ship_address = order.ship_address.clone if order.ship_address and order.shipping_method.andand.require_ship_address
|
||||
end
|
||||
|
||||
[bill_address, ship_address]
|
||||
|
||||
@@ -449,16 +449,16 @@ feature %q{
|
||||
click_link 'Zucchini'
|
||||
click_button 'Add To Cart'
|
||||
find('#checkout-link').click
|
||||
visit "/checkout" # Force to old checkout
|
||||
|
||||
# -- Login
|
||||
# We perform login inline because:
|
||||
# a) It's a common user flow
|
||||
# b) It has been known to trigger errors with spree_last_address
|
||||
within "#checkout_login" do
|
||||
fill_in 'login_spree_user_email', :with => 'someone@ofn.org'
|
||||
fill_in 'login_spree_user_password', :with => 'passw0rd'
|
||||
click_button 'Login'
|
||||
end
|
||||
fill_in 'spree_user_email', :with => 'someone@ofn.org'
|
||||
fill_in 'spree_user_password', :with => 'passw0rd'
|
||||
click_button 'Login'
|
||||
visit "/checkout" # Force to old checkout
|
||||
|
||||
# -- Checkout: Address
|
||||
page.should have_field 'order_bill_address_attributes_firstname', with: 'Joe'
|
||||
|
||||
Reference in New Issue
Block a user