Randomize also city and zipcode for randomized address

This commit is contained in:
Jean-Baptiste Bellet
2023-07-07 10:42:36 +02:00
parent bfb2fc528e
commit f177258444
2 changed files with 5 additions and 1 deletions

View File

@@ -27,6 +27,8 @@ FactoryBot.define do
address1 { FFaker::Address.street_address }
address2 { nil }
phone { FFaker::PhoneNumber.phone_number }
city { FFaker::Address.city }
zipcode { FFaker::AddressUS.zip_code }
end
end
end

View File

@@ -293,7 +293,9 @@ describe OrderSyncer do
create(:address, firstname: original_bill_address.firstname,
lastname: original_bill_address.lastname,
address1: distributor_address.address1,
phone: original_bill_address.phone)
phone: original_bill_address.phone,
city: distributor_address.city,
zipcode: distributor_address.zipcode)
end
let(:subscription) do
create(:subscription, shop: distributor, bill_address: original_bill_address,