2014-09-02 18:07:02 +05:30
|
|
|
FactoryGirl.define do
|
|
|
|
factory :forked_project_link do
|
2017-09-10 17:25:29 +05:30
|
|
|
association :forked_to_project, factory: [:project, :repository]
|
|
|
|
association :forked_from_project, factory: [:project, :repository]
|
2016-06-02 11:05:42 +05:30
|
|
|
|
|
|
|
after(:create) do |link|
|
|
|
|
link.forked_from_project.reload
|
|
|
|
link.forked_to_project.reload
|
|
|
|
end
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
trait :forked_to_empty_project do
|
|
|
|
association :forked_to_project, factory: [:project, :repository]
|
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
end
|