Files
codeocean/spec/factories/consumer.rb
2021-05-14 22:03:06 +02:00

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