FactoryBot.define do factory :task, class: Ecom::Core::Task do code { FFaker::Guid.guid } name { FFaker::Name.name } description { FFaker::Name.name } start_date { Date.yesterday } end_date { Date.today } status { :new } percent_completed { 0 } remark { FFaker::Name.name } association :performer, factory: :user association :approver, factory: :user association :supervisor, factory: :user association :quality_controller, factory: :user association :task_template association :work_product association :work_package end end