Add address factory with randomized attributes

Randomizing all addresses generated will be explored separately.
This commit is contained in:
Kristina Lim
2019-03-22 02:45:45 +08:00
parent d047e04e33
commit 7be669e1dd

View 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