FactoryBot.define do factory :master_price, class: "Comee::Core::MasterPrice" do pp_valid_from { Date.current.advance(months: -1) } pp_valid_to { Date.current.advance(months: 1) } sp_valid_from { Date.current.advance(months: -1) } sp_valid_to { Date.current.advance(months: 1) } old_pprice { nil } new_pprice { 100 } old_sprice { nil } new_sprice { 120 } primary { false } product supplier end end