Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Use random names in user factory

Damian Legawiece46fb123c999
diff --git a/core/lib/spree/testing_support/factories/user_factory.rb b/core/lib/spree/testing_support/factories/user_factory.rb
index 97d8c199ca..8b4457b830 100644
--- a/core/lib/spree/testing_support/factories/user_factory.rb
+++ b/core/lib/spree/testing_support/factories/user_factory.rb
@@ -9,8 +9,10 @@ FactoryBot.define do
password { 'secret' }
password_confirmation { password }
authentication_token { generate(:user_authentication_token) } if Spree.user_class.attribute_method? :authentication_token
- first_name { 'John' }
- last_name { 'Snow' }
+
+ first_name { FFaker::Name.first_name }
+ last_name { FFaker::Name.last_name }
+
public_metadata { {} }
private_metadata { {} }