FactoryBot.define do factory :master_price, class: "Comee::Core::MasterPrice" do purchase_price { 100.0 } selling_price { 90.0 } 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) } active { true } primary { false } margin { 10.0 } product supplier previous_price { nil } status { 0 } end end