Fix traits of runners factories

This commit is contained in:
Kamil Trzciński 2018-05-28 12:55:13 +02:00 committed by Dylan Griffith
parent c6e95b0440
commit 782337b3f2

View file

@ -21,11 +21,19 @@ FactoryBot.define do
trait :group do trait :group do
is_shared false is_shared false
runner_type :group_type runner_type :group_type
after(:build) do |runner, evaluator|
runner.groups << build(:group) if runner.groups.empty?
end
end end
trait :project do trait :project do
is_shared false is_shared false
runner_type :project_type runner_type :project_type
after(:build) do |runner, evaluator|
runner.projects << build(:project) if runner.projects.empty?
end
end end
trait :inactive do trait :inactive do