Fix traits of runners factories
This commit is contained in:
parent
c6e95b0440
commit
782337b3f2
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue