fix build list factory
same as https://github.com/warpc/rosa-build/pull/799/files#diff-26
This commit is contained in:
parent
71125eac81
commit
508ec266f0
|
@ -4,7 +4,11 @@ FactoryGirl.define do
|
|||
association :user
|
||||
#association :project
|
||||
association :save_to_platform, :factory => :platform_with_repos
|
||||
project { |bl| FactoryGirl.create(:project_with_commit, :repositories => [bl.save_to_platform.repositories.first]) }
|
||||
project { |bl|
|
||||
pr = FactoryGirl.create(:project_with_commit)
|
||||
bl.save_to_platform.repositories.first.projects << pr
|
||||
pr
|
||||
}
|
||||
association :arch
|
||||
build_for_platform {|bl| bl.save_to_platform}
|
||||
save_to_repository {|bl| bl.save_to_platform.repositories.first}
|
||||
|
@ -27,7 +31,11 @@ FactoryGirl.define do
|
|||
end
|
||||
|
||||
factory :build_list_by_group_project, :parent => :build_list_core do
|
||||
project { |bl| FactoryGirl.create(:group_project_with_commit, :repositories => [bl.save_to_platform.repositories.first]) }
|
||||
project { |bl|
|
||||
pr = FactoryGirl.create(:group_project_with_commit)
|
||||
bl.save_to_platform.repositories.first.projects << pr
|
||||
pr
|
||||
}
|
||||
end
|
||||
|
||||
factory :build_list_package, :class => BuildList::Package do
|
||||
|
|
Loading…
Reference in New Issue