Files
codeocean/spec/factories/consumer.rb
2018-11-06 16:45:59 +01:00

13 lines
278 B
Ruby

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