Commit 782337b3 authored by Kamil Trzciński's avatar Kamil Trzciński Committed by Dylan Griffith

Fix traits of runners factories

parent c6e95b04
...@@ -21,11 +21,19 @@ FactoryBot.define do ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment