FactoryBot.define do factory :work_order, class: Ecom::Core::WorkOrder do name { FFaker::Name.unique.name } association :assigned_to, factory: :crew association :generated_by, factory: :user start_date { (Time.now + 1.day).to_s } end_date { (Time.now + 1.month).to_s } status { Ecom::Core::WorkOrder::STATUSES.sample } end end