Skip to content

Commit

Permalink
[ci] modify maintenance_project factory to point to a target maintain…
Browse files Browse the repository at this point in the history
…ed project
  • Loading branch information
Moises Deniz Aleman authored and bgeuken committed Nov 16, 2016
1 parent c2f3d8a commit 4bd903e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/api/spec/factories/project.rb
Expand Up @@ -54,8 +54,13 @@
factory :maintenance_project do
kind 'maintenance'

after(:create) do |project|
transient do
target_project nil
end

after(:create) do |project, evaluator|
create(:maintainance_project_attrib, project: project)
create(:maintained_project, project: evaluator.target_project, maintenance_project: project) if evaluator.target_project
end
end

Expand Down

0 comments on commit 4bd903e

Please sign in to comment.