mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-09 03:20:21 +00:00
Update customer factory
This commit is contained in:
committed by
Maikel Linke
parent
eefd9891d6
commit
75345a95af
@@ -113,14 +113,6 @@ FactoryBot.define do
|
||||
property
|
||||
end
|
||||
|
||||
factory :customer, class: Customer do
|
||||
email { generate(:random_email) }
|
||||
enterprise
|
||||
code { SecureRandom.base64(150) }
|
||||
user
|
||||
bill_address { create(:address) }
|
||||
end
|
||||
|
||||
factory :stripe_account do
|
||||
enterprise { FactoryBot.create(:distributor_enterprise) }
|
||||
stripe_user_id { "abc123" }
|
||||
|
||||
13
spec/factories/customer_factory.rb
Normal file
13
spec/factories/customer_factory.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :customer, class: Customer do
|
||||
first_name { FFaker::Name.first_name }
|
||||
last_name { FFaker::Name.last_name }
|
||||
email { generate(:random_email) }
|
||||
enterprise
|
||||
code { SecureRandom.base64(150) }
|
||||
user
|
||||
bill_address { create(:address) }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user