15 lines
309 B
Ruby
15 lines
309 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :consumer do
|
|
name { 'openHPI' }
|
|
oauth_key { SecureRandom.hex }
|
|
oauth_secret { SecureRandom.hex }
|
|
singleton_consumer
|
|
end
|
|
|
|
trait :singleton_consumer do
|
|
initialize_with { Consumer.where(name: name).first_or_create }
|
|
end
|
|
end
|