diff options
Diffstat (limited to 'spec/factories/work_items.rb')
-rw-r--r-- | spec/factories/work_items.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories/work_items.rb b/spec/factories/work_items.rb index cff246d4071..3cb4d8cd8bc 100644 --- a/spec/factories/work_items.rb +++ b/spec/factories/work_items.rb @@ -37,5 +37,12 @@ FactoryBot.define do issue_type { :key_result } association :work_item_type, :default, :key_result end + + before(:create, :build) do |work_item, evaluator| + if evaluator.namespace.present? + work_item.project = nil + work_item.namespace = evaluator.namespace + end + end end end |