Skip to content

Commit

Permalink
Merge pull request #12644 from mkllnk/spec-fixes
Browse files Browse the repository at this point in the history
Fix orders and distributors report after product refactor
  • Loading branch information
mkllnk authored Jul 5, 2024
2 parents 2b10862 + d602482 commit c8cb15d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/reporting/reports/orders_and_distributors/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def query_result
private

def line_item_includes
[{ variant: { product: :supplier },
[{ variant: [:supplier, :product],
order: [:bill_address, :payments, { distributor: :address }] }]
end

Expand Down
3 changes: 2 additions & 1 deletion spec/lib/reports/orders_and_distributors_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
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) {
Expand Down

0 comments on commit c8cb15d

Please sign in to comment.