2012-03-29 21:34:22 +01:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :platform do
|
|
|
|
name { FactoryGirl.generate(:unixname) }
|
2015-02-19 01:12:08 +00:00
|
|
|
default_branch { |p| p.name }
|
2012-04-04 22:43:06 +01:00
|
|
|
description { FactoryGirl.generate(:string) }
|
2012-03-29 21:34:22 +01:00
|
|
|
platform_type 'main'
|
|
|
|
distrib_type APP_CONFIG['distr_types'].first
|
2014-01-21 04:51:49 +00:00
|
|
|
association :owner, factory: :user
|
2011-12-23 02:14:28 +00:00
|
|
|
|
2012-04-04 22:43:06 +01:00
|
|
|
factory :platform_with_repos do
|
2012-07-17 09:02:56 +01:00
|
|
|
after(:create) {|p| FactoryGirl.create_list(:repository, 1, platform: p)}
|
2012-04-04 22:43:06 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
factory :personal_platform do
|
|
|
|
platform_type 'personal'
|
|
|
|
end
|
2012-04-02 16:43:59 +01:00
|
|
|
end
|
2012-01-30 20:39:34 +00:00
|
|
|
end
|