2017-12-14 00:13:44 +00:00
|
|
|
FactoryBot.define do
|
2013-03-19 15:37:50 +00:00
|
|
|
factory :forked_project_link do
|
2017-08-02 19:55:11 +00:00
|
|
|
association :forked_to_project, factory: [:project, :repository]
|
|
|
|
association :forked_from_project, factory: [:project, :repository]
|
2016-04-04 19:05:51 +00:00
|
|
|
|
|
|
|
after(:create) do |link|
|
|
|
|
link.forked_from_project.reload
|
|
|
|
link.forked_to_project.reload
|
|
|
|
end
|
2017-06-01 14:27:35 +00:00
|
|
|
|
|
|
|
trait :forked_to_empty_project do
|
2017-08-02 19:55:11 +00:00
|
|
|
association :forked_to_project, factory: [:project, :repository]
|
2017-06-01 14:27:35 +00:00
|
|
|
end
|
2013-03-19 15:37:50 +00:00
|
|
|
end
|
|
|
|
end
|