mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add address factory with randomized attributes
Randomizing all addresses generated will be explored separately.
This commit is contained in:
11
spec/factories/address_factory.rb
Normal file
11
spec/factories/address_factory.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
FactoryBot.modify do
|
||||
factory :address do
|
||||
trait :randomized do
|
||||
firstname { Faker::Name.first_name }
|
||||
lastname { Faker::Name.last_name }
|
||||
address1 { Faker::Address.street_address }
|
||||
address2 nil
|
||||
phone { Faker::PhoneNumber.phone_number }
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user