Retrospring/spec/factories/10_users.rb

10 lines
319 B
Ruby
Raw Normal View History

2020-04-19 08:27:42 -07:00
FactoryBot.define do
2014-11-14 11:45:30 -08:00
factory :user do |u|
2014-12-07 03:42:03 -08:00
u.sequence(:screen_name) { |n| "#{Faker::Internet.user_name 0..12, %w(_)}#{n}" }
u.sequence(:email) { |n| "#{n}#{Faker::Internet.email}" }
2020-04-19 08:27:42 -07:00
u.password { "P4s5w0rD" }
2015-07-21 10:08:40 -07:00
u.sequence(:confirmed_at) { Time.zone.now }
2014-11-14 11:45:30 -08:00
u.display_name { Faker::Name.name }
end
end