From d48b00c77c9219bf845c05eeba212af695b281c8 Mon Sep 17 00:00:00 2001 From: Bing Xie Date: Fri, 16 Sep 2016 18:47:38 +1000 Subject: [PATCH] Fix failed user spec --- spec/models/spree/user_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/spree/user_spec.rb b/spec/models/spree/user_spec.rb index 3c112413c6..0b57414677 100644 --- a/spec/models/spree/user_spec.rb +++ b/spec/models/spree/user_spec.rb @@ -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