docbrown/spec/factories/identities.rb
Anna Buianova 792cd68786
Fixed setting Identity#auth_data_dump in seeds and factory (#15874)
* Fixed setting Identity#auth_data_dump in seeds and factory

* Mock omniauth providers in the Identity spec
2021-12-28 09:02:15 +03:00

11 lines
273 B
Ruby

FactoryBot.define do
sequence(:uid, 100_000) { |n| n }
factory :identity do
uid { generate(:uid) }
provider { "github" }
token { rand(100_000) }
secret { rand(100_000) }
auth_data_dump { OmniAuth.config.mock_auth.fetch(provider.to_sym) }
end
end