Sha256: c522384b5e1a8c9baa1fe2bf79f8b6f9dd176a86d5875b00a50f8fb5378a2934

Contents?: true

Size: 572 Bytes

Versions: 8

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

require 'factory_bot'
require 'securerandom'

FactoryBot.define do
  factory :meibo_user_profile, class: 'Meibo::UserProfile' do
    initialize_with { new(**attributes) }

    transient do
      user { nil }
    end

    sourced_id { SecureRandom.uuid }
    user_sourced_id { user&.sourced_id }
    profile_type { 'meibo test' }
    vendor_id { 'meibo' }
    credential_type { 'plain' }
    sequence(:username) {|n| "user#{n}"}

    trait :jp do
      initialize_with { Meibo::JapanProfile::UserProfile.new(**attributes) }
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
meibo-0.16.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.15.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.14.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.13.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.12.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.11.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.10.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.9.0 lib/meibo/factory_bot/user_profile.rb