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
1 changed files with 8 additions and 0 deletions

View File

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