mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix failed user spec
This commit is contained in:
@@ -11,7 +11,7 @@ describe Spree.user_class do
|
||||
old_bill_address = user.bill_address
|
||||
new_bill_address = create(:address, firstname: 'abc')
|
||||
|
||||
user.set_bill_address(new_bill_address)
|
||||
user.update_attributes(bill_address_attributes: new_bill_address.clone.attributes.merge('id' => old_bill_address.id))
|
||||
|
||||
expect(user.bill_address.id).to eq old_bill_address.id
|
||||
expect(user.bill_address.firstname).to eq new_bill_address.firstname
|
||||
@@ -20,7 +20,7 @@ describe Spree.user_class do
|
||||
it 'creates new shipping address' do
|
||||
new_ship_address = create(:address, firstname: 'abc')
|
||||
|
||||
user.set_ship_address(new_ship_address)
|
||||
user.update_attributes(ship_address_attributes: new_ship_address.clone.attributes)
|
||||
|
||||
expect(user.ship_address.id).not_to eq new_ship_address.id
|
||||
expect(user.ship_address.firstname).to eq new_ship_address.firstname
|
||||
|
||||
Reference in New Issue
Block a user