FactoryBot.define do factory :rate_change_request, class: 'Mks::Rate::RateChangeRequest' do reference_number { FFaker::Name.unique.name } authorized_by { FFaker::Name.name } effective_on { Date.today } authorized_on { Date.today } rates { [{ 'chargeable_service_id': 1, 'base_rate': 100, 'utilization_rate': 50 }, { 'chargeable_service_id': 2, 'base_rate': 100, 'utilization_rate': 25 }] } status { 'SUBMITTED' } association :created_by, factory: :user association :approved_by, factory: :user end end