Merge pull request #12644 from mkllnk/spec-fixes

Fix orders and distributors report after product refactor
This commit is contained in:
Maikel
2024-07-05 13:25:37 +10:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ module Reporting
private
def line_item_includes
[{ variant: { product: :supplier },
[{ variant: [:supplier, :product],
order: [:bill_address, :payments, { distributor: :address }] }]
end

View File

@@ -25,7 +25,8 @@ RSpec.describe Reporting::Reports::OrdersAndDistributors::Base do
let(:distributor1) { create(:distributor_enterprise) }
let(:supplier) { create(:supplier_enterprise) }
let(:user) { create(:admin_user) }
let(:product) { create(:product, supplier:) }
let(:product) { variant.product }
let(:variant) { create(:variant, supplier:) }
let(:shipping_method) { create(:shipping_method) }
let(:shipping_instructions) { 'pick up on thursday please!' }
let(:order) {