Sha256: 59ac00e4d3daf4125f2936f91422cf17e442e8242dd8beb15859b821d284d94f

Contents?: true

Size: 574 Bytes

Versions: 15

Compression:

Stored size: 574 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

15 entries across 15 versions & 1 rubygems

Version Path
meibo-0.27.1 lib/meibo/factory_bot/user_profile.rb
meibo-0.27.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.26.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.25.3 lib/meibo/factory_bot/user_profile.rb
meibo-0.25.2 lib/meibo/factory_bot/user_profile.rb
meibo-0.25.1 lib/meibo/factory_bot/user_profile.rb
meibo-0.25.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.24.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.23.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.22.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.21.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.20.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.19.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.18.0 lib/meibo/factory_bot/user_profile.rb
meibo-0.17.0 lib/meibo/factory_bot/user_profile.rb