user_fabricator.rb 377 B

123456789101112131415
  1. # frozen_string_literal: true
  2. Fabricator(:user) do
  3. account do |attrs|
  4. Fabricate.build(
  5. :account,
  6. attrs.fetch(:account_attributes, {}).merge(user: nil)
  7. )
  8. end
  9. email { sequence(:email) { |i| "#{i}#{Faker::Internet.email}" } }
  10. password '123456789'
  11. confirmed_at { Time.zone.now }
  12. current_sign_in_at { Time.zone.now }
  13. agreement true
  14. end