rosa-build/spec/factories/platforms.rb

18 lines
462 B
Ruby
Raw Normal View History

FactoryGirl.define do
factory :platform do
name { FactoryGirl.generate(:unixname) }
description { FactoryGirl.generate(:string) }
platform_type 'main'
distrib_type APP_CONFIG['distr_types'].first
2014-01-21 04:51:49 +00:00
association :owner, factory: :user
factory :platform_with_repos do
after(:create) {|p| FactoryGirl.create_list(:repository, 1, platform: p)}
end
factory :personal_platform do
platform_type 'personal'
end
end
2012-01-30 20:39:34 +00:00
end