Sha256: 70e9821747f64005af4f60dff677f0c7c085a5b14fb567e778203096eb1cdf4f

Contents?: true

Size: 611 Bytes

Versions: 10

Compression:

Stored size: 611 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :user, class: Osso::Models::User do
    id { SecureRandom.uuid }
    email { Faker::Internet.email }
    idp_id { SecureRandom.hex(32) }
    identity_provider { create(:okta_identity_provider) }
    enterprise_account
    after(:create) do |user|
      create(
        :authorization_code,
        user: user,
        redirect_uri: user.oauth_client.redirect_uri_values.sample,
        requested: [
          { domain: user.email.split('@')[1], email: nil },
          { domain: nil, email: user.email },
        ].sample,
      )
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
osso-0.1.2 spec/factories/user.rb
osso-0.1.1 spec/factories/user.rb
osso-0.1.0 spec/factories/user.rb
osso-0.0.11 spec/factories/user.rb
osso-0.0.10 spec/factories/user.rb
osso-0.0.8 spec/factories/user.rb
osso-0.0.7 spec/factories/user.rb
osso-0.0.6 spec/factories/user.rb
osso-0.0.6.alpha spec/factories/user.rb
osso-0.0.5 spec/factories/user.rb